Struct ntp_daemon::spawn::nts::NtsSpawner
source · pub struct NtsSpawner { /* private fields */ }Implementations§
source§impl NtsSpawner
impl NtsSpawner
pub fn new(config: NtsPeerConfig, network_wait_period: Duration) -> NtsSpawner
Trait Implementations§
source§impl BasicSpawner for NtsSpawner
impl BasicSpawner for NtsSpawner
type Error = NtsSpawnError
source§fn handle_init<'life0, 'life1, 'async_trait>(
&'life0 mut self,
action_tx: &'life1 Sender<SpawnEvent>
) -> Pin<Box<dyn Future<Output = Result<(), NtsSpawnError>> + 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<(), NtsSpawnError>> + 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<(), NtsSpawnError>> + 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<(), NtsSpawnError>> + 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 NtsSpawner
impl Send for NtsSpawner
impl Sync for NtsSpawner
impl Unpin for NtsSpawner
impl UnwindSafe for NtsSpawner
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