Struct ntp_daemon::spawn::standard::StandardSpawner
source · 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 RefUnwindSafe for StandardSpawner
impl Send for StandardSpawner
impl Sync for StandardSpawner
impl Unpin for StandardSpawner
impl UnwindSafe for StandardSpawner
Blanket Implementations§
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 Twhere
T: BasicSpawner<Error = E> + Send + 'static,
E: Error + Send + 'static,
impl<T, E> Spawner for Twhere T: BasicSpawner<Error = E> + Send + 'static, E: Error + Send + 'static,
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, Global>>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, Global>>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