[][src]Enum libp2p::core::nodes::collection::CollectionEvent

pub enum CollectionEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> where
    TConnInfo: 'a,
    THandler: 'a,
    THandlerErr: 'a,
    TInEvent: 'a,
    TOutEvent: 'a,
    TPeerId: 'a,
    TReachErr: 'a,
    TUserData: 'a, 
{ NodeReached(CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId>), NodeClosed { conn_info: TConnInfo, error: HandledNodeError<THandlerErr>, user_data: TUserData, }, ReachError { id: ReachAttemptId, error: TReachErr, handler: THandler, }, NodeEvent { peer: PeerMut<'a, TInEvent, TUserData, TConnInfo, TPeerId>, event: TOutEvent, }, }

Event that can happen on the CollectionStream.

Variants

NodeReached(CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId>)

A connection to a node has succeeded. You must use the provided event in order to accept the connection.

NodeClosed

A connection to a node has errored.

Can only happen after a node has been successfully reached.

Fields of NodeClosed

conn_info: TConnInfo

Information about the connection.

error: HandledNodeError<THandlerErr>

The error that happened.

user_data: TUserData

User data that was passed when accepting.

ReachError

An error happened on the future that was trying to reach a node.

Fields of ReachError

id: ReachAttemptId

Identifier of the reach attempt that failed.

error: TReachErr

Error that happened on the future.

handler: THandler

The handler that was passed to add_reach_attempt.

NodeEvent

A node has produced an event.

Fields of NodeEvent

peer: PeerMut<'a, TInEvent, TUserData, TConnInfo, TPeerId>

The node that has generated the event.

event: TOutEvent

The produced event.

Trait Implementations

impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> Debug for CollectionEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> where
    TConnInfo: Debug,
    THandlerErr: Debug,
    TOutEvent: Debug,
    TReachErr: Debug,
    TUserData: Debug
[src]

Auto Trait Implementations

impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> Send for CollectionEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> where
    TConnInfo: Send,
    THandler: Send,
    THandlerErr: Send,
    TInEvent: Send,
    TOutEvent: Send,
    TPeerId: Send,
    TReachErr: Send,
    TUserData: Send

impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> !Sync for CollectionEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.