pub struct StandardSpawner { /* private fields */ }Implementations§
Source§impl StandardSpawner
impl StandardSpawner
pub fn new( config: StandardPeerConfig, network_wait_period: Duration, ) -> StandardSpawner
Trait Implementations§
Source§impl BasicSpawner for StandardSpawner
impl BasicSpawner for StandardSpawner
type Error = StandardSpawnError
Source§fn handle_init<'life0, 'life1, 'async_trait>(
&'life0 mut self,
action_tx: &'life1 Sender<SpawnEvent>,
) -> Pin<Box<dyn Future<Output = Result<(), StandardSpawnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_init<'life0, 'life1, 'async_trait>(
&'life0 mut self,
action_tx: &'life1 Sender<SpawnEvent>,
) -> Pin<Box<dyn Future<Output = Result<(), StandardSpawnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle initial spawning. Read more
Source§fn handle_peer_removed<'life0, 'life1, 'async_trait>(
&'life0 mut self,
removed_peer: PeerRemovedEvent,
action_tx: &'life1 Sender<SpawnEvent>,
) -> Pin<Box<dyn Future<Output = Result<(), StandardSpawnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_peer_removed<'life0, 'life1, 'async_trait>(
&'life0 mut self,
removed_peer: PeerRemovedEvent,
action_tx: &'life1 Sender<SpawnEvent>,
) -> Pin<Box<dyn Future<Output = Result<(), StandardSpawnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Event handler for when a peer is removed. Read more
Source§fn get_addr_description(&self) -> String
fn get_addr_description(&self) -> String
Get a description of the address this spawner is connected to
Source§fn get_description(&self) -> &str
fn get_description(&self) -> &str
Get a description of the type of spawner
Source§fn handle_registered<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_event: PeerCreateParameters,
_action_tx: &'life1 Sender<SpawnEvent>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_registered<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_event: PeerCreateParameters,
_action_tx: &'life1 Sender<SpawnEvent>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Event handler for when a peer is succesfully registered in the system Read more
Auto Trait Implementations§
impl Freeze for StandardSpawner
impl RefUnwindSafe for StandardSpawner
impl Send for StandardSpawner
impl Sync for StandardSpawner
impl Unpin for StandardSpawner
impl UnwindSafe for StandardSpawner
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, E> Spawner for T
impl<T, E> Spawner for T
type Error = E
Source§fn run<'async_trait>(
self,
action_tx: Sender<SpawnEvent>,
system_notify: Receiver<SystemEvent>,
) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>where
T: 'async_trait,
fn run<'async_trait>(
self,
action_tx: Sender<SpawnEvent>,
system_notify: Receiver<SystemEvent>,
) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>where
T: 'async_trait,
Run a spawner Read more
Source§fn get_addr_description(&self) -> String
fn get_addr_description(&self) -> String
Get a description of the address that this spawner is connected to
Source§fn get_description(&self) -> &str
fn get_description(&self) -> &str
Get a description of the type of spawner