[][src]Enum libp2p::core::nodes::handled_node_tasks::HandledNodesEvent

pub enum HandledNodesEvent<'a, TInEvent, TOutEvent, TIntoHandler, TReachErr, THandlerErr, TUserData, TConnInfo = PeerId> where
    TInEvent: 'a,
    TUserData: 'a, 
{ TaskClosed { task: ClosedTask<TInEvent, TUserData>, result: TaskClosedEvent<TReachErr, THandlerErr>, handler: Option<TIntoHandler>, }, NodeReached { task: Task<'a, TInEvent, TUserData>, conn_info: TConnInfo, }, NodeEvent { task: Task<'a, TInEvent, TUserData>, event: TOutEvent, }, }

Event that can happen on the HandledNodesTasks.

Variants

TaskClosed

A task has been closed.

This happens once the node handler closes or an error happens.

Fields of TaskClosed

task: ClosedTask<TInEvent, TUserData>

The task that has been closed.

result: TaskClosedEvent<TReachErr, THandlerErr>

What happened.

handler: Option<TIntoHandler>

If the task closed before reaching the node, this contains the handler that was passed to add_reach_attempt.

NodeReached

A task has successfully connected to a node.

Fields of NodeReached

task: Task<'a, TInEvent, TUserData>

The task that succeeded.

conn_info: TConnInfo

Identifier of the node.

NodeEvent

A task has produced an event.

Fields of NodeEvent

task: Task<'a, TInEvent, TUserData>

The task that produced the event.

event: TOutEvent

The produced event.

Trait Implementations

impl<'a, TInEvent, TOutEvent, TIntoHandler, TReachErr, THandlerErr, TUserData, TConnInfo> Debug for HandledNodesEvent<'a, TInEvent, TOutEvent, TIntoHandler, TReachErr, THandlerErr, TUserData, TConnInfo> where
    TConnInfo: Debug,
    THandlerErr: Debug,
    TInEvent: Debug,
    TIntoHandler: Debug,
    TOutEvent: Debug,
    TReachErr: Debug,
    TUserData: Debug
[src]

Auto Trait Implementations

impl<'a, TInEvent, TOutEvent, TIntoHandler, TReachErr, THandlerErr, TUserData, TConnInfo> Send for HandledNodesEvent<'a, TInEvent, TOutEvent, TIntoHandler, TReachErr, THandlerErr, TUserData, TConnInfo> where
    TConnInfo: Send,
    THandlerErr: Send,
    TInEvent: Send,
    TIntoHandler: Send,
    TOutEvent: Send,
    TReachErr: Send,
    TUserData: Send

impl<'a, TInEvent, TOutEvent, TIntoHandler, TReachErr, THandlerErr, TUserData, TConnInfo> Sync for HandledNodesEvent<'a, TInEvent, TOutEvent, TIntoHandler, TReachErr, THandlerErr, TUserData, TConnInfo> where
    TConnInfo: Sync,
    THandlerErr: Sync,
    TInEvent: Send,
    TIntoHandler: Sync,
    TOutEvent: Sync,
    TReachErr: Sync,
    TUserData: Sync

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.