pub enum PoolEvent {
NewPeer(PeerID),
RemovePeer(PeerID),
HandshakeFailed(Option<PeerID>),
ConnectFailed(Option<PeerID>, Endpoint),
PeerAlreadyConnected(PeerID),
}Expand description
Peer-pool lifecycle events.
Variants§
NewPeer(PeerID)
RemovePeer(PeerID)
HandshakeFailed(Option<PeerID>)
ConnectFailed(Option<PeerID>, Endpoint)
Outbound dial failed. peer_id may be None for manual peer
endpoints whose id wasn’t pre-shared.
PeerAlreadyConnected(PeerID)
Inbound or outbound connection rejected because a peer with the same id is already connected.
Implementations§
Source§impl PoolEvent
impl PoolEvent
pub(super) fn get_peer_id(&self) -> Option<&PeerID>
pub(super) fn get_endpoint(&self) -> Option<&Endpoint>
pub(super) fn variant_name(&self) -> &'static str
Trait Implementations§
Source§impl From<PoolEvent> for PeerPoolEvent
impl From<PoolEvent> for PeerPoolEvent
Auto Trait Implementations§
impl Freeze for PoolEvent
impl RefUnwindSafe for PoolEvent
impl Send for PoolEvent
impl Sync for PoolEvent
impl Unpin for PoolEvent
impl UnsafeUnpin for PoolEvent
impl UnwindSafe for PoolEvent
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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