[][src]Enum libp2p_core::nodes::handled_node_tasks::HandledNodesEvent

pub enum HandledNodesEvent<TOutEvent, TIntoHandler, TReachErr, THandlerErr> {
    TaskClosed {
        id: TaskId,
        result: Result<(), TaskClosedEvent<TReachErr, THandlerErr>>,
        handler: Option<TIntoHandler>,
    },
    NodeReached {
        id: TaskId,
        peer_id: PeerId,
    },
    NodeEvent {
        id: TaskId,
        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

id: TaskId

Identifier of the task that closed.

result: 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

id: TaskId

Identifier of the task that succeeded.

peer_id: PeerId

Identifier of the node.

NodeEvent

A task has produced an event.

Fields of NodeEvent

id: TaskId

Identifier of the task that produced the event.

event: TOutEvent

The produced event.

Trait Implementations

impl<TOutEvent: Debug, TIntoHandler: Debug, TReachErr: Debug, THandlerErr: Debug> Debug for HandledNodesEvent<TOutEvent, TIntoHandler, TReachErr, THandlerErr>
[src]

Auto Trait Implementations

impl<TOutEvent, TIntoHandler, TReachErr, THandlerErr> Send for HandledNodesEvent<TOutEvent, TIntoHandler, TReachErr, THandlerErr> where
    THandlerErr: Send,
    TIntoHandler: Send,
    TOutEvent: Send,
    TReachErr: Send

impl<TOutEvent, TIntoHandler, TReachErr, THandlerErr> Sync for HandledNodesEvent<TOutEvent, TIntoHandler, TReachErr, THandlerErr> where
    THandlerErr: Sync,
    TIntoHandler: Sync,
    TOutEvent: Sync,
    TReachErr: Sync

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Same for T

type Output = T

Should always be Self

impl<T> Erased for T