pub struct PoolSpawner { /* private fields */ }Implementations§
Source§impl PoolSpawner
impl PoolSpawner
pub fn new(config: PoolPeerConfig, network_wait_period: Duration) -> PoolSpawner
pub async fn fill_pool( &mut self, action_tx: &Sender<SpawnEvent>, ) -> Result<(), PoolSpawnError>
Trait Implementations§
Source§impl BasicSpawner for PoolSpawner
impl BasicSpawner for PoolSpawner
type Error = PoolSpawnError
Source§fn handle_init<'life0, 'life1, 'async_trait>(
&'life0 mut self,
action_tx: &'life1 Sender<SpawnEvent>,
) -> Pin<Box<dyn Future<Output = Result<(), PoolSpawnError>> + 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<(), PoolSpawnError>> + 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<(), PoolSpawnError>> + 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<(), PoolSpawnError>> + 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 PoolSpawner
impl RefUnwindSafe for PoolSpawner
impl Send for PoolSpawner
impl Sync for PoolSpawner
impl Unpin for PoolSpawner
impl UnwindSafe for PoolSpawner
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