pub struct RustIOHandler { /* private fields */ }
Implementations§
Source§impl RustIOHandler
impl RustIOHandler
pub fn new(sender: Sender<IoEvent>, handler_id: u8) -> RustIOHandler
Trait Implementations§
Source§impl Debug for RustIOHandler
impl Debug for RustIOHandler
Source§impl InterfaceIO for RustIOHandler
impl InterfaceIO for RustIOHandler
fn send_message<'life0, 'life1, 'async_trait>(
&'life0 self,
peer_index: u64,
buffer: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn send_message_to_all<'life0, 'life1, 'async_trait>(
&'life0 self,
buffer: &'life1 [u8],
peer_exceptions: Vec<u64>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_message_to_all<'life0, 'life1, 'async_trait>(
&'life0 self,
buffer: &'life1 [u8],
peer_exceptions: Vec<u64>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sends the given message buffer to all the peers except the ones specified Read more
Source§fn connect_to_peer<'life0, 'async_trait>(
&'life0 mut self,
url: String,
peer_index: PeerIndex,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect_to_peer<'life0, 'async_trait>(
&'life0 mut self,
url: String,
peer_index: PeerIndex,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Connects to the peer with given configuration Read more
fn disconnect_from_peer<'life0, 'async_trait>(
&'life0 self,
peer_index: u64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn fetch_block_from_peer<'life0, 'life1, 'async_trait>(
&'life0 self,
block_hash: SaitoHash,
peer_index: u64,
url: &'life1 str,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_block_from_peer<'life0, 'life1, 'async_trait>(
&'life0 self,
block_hash: SaitoHash,
peer_index: u64,
url: &'life1 str,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches a block with given hash from a specific peer Read more
Source§fn write_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Writes a value to a persistent storage with the given key Read more
fn append_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
key: &'life1 str,
value: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn flush_data<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn read_value<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_value<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reads a value with the given key from a persistent storage Read more
Source§fn load_block_file_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_block_file_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads the block path list from the persistent storage
fn is_existing_file<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn remove_value<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_value<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Removes the value with the given key from the persistent storage
Source§fn get_block_dir(&self) -> String
fn get_block_dir(&self) -> String
Retrieve the prefix for all the keys for blocks
fn get_checkpoint_dir(&self) -> String
fn ensure_block_directory_exists( &self, block_dir_path: &str, ) -> Result<(), Error>
fn process_api_call<'life0, 'async_trait>(
&'life0 self,
_buffer: Vec<u8>,
_msg_index: u32,
_peer_index: PeerIndex,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_api_success<'life0, 'async_trait>(
&'life0 self,
_buffer: Vec<u8>,
_msg_index: u32,
_peer_index: PeerIndex,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_api_error<'life0, 'async_trait>(
&'life0 self,
_buffer: Vec<u8>,
_msg_index: u32,
_peer_index: PeerIndex,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_interface_event(&self, _event: InterfaceEvent)
fn save_wallet<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 mut Wallet,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_wallet<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 mut Wallet,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_my_services(&self) -> Vec<PeerService>
Auto Trait Implementations§
impl Freeze for RustIOHandler
impl !RefUnwindSafe for RustIOHandler
impl Send for RustIOHandler
impl Sync for RustIOHandler
impl Unpin for RustIOHandler
impl !UnwindSafe for RustIOHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more