pub enum HandledNodesEvent<TOutEvent, THandler, TReachErr, THandlerErr> {
    TaskClosed {
        id: TaskId,
        result: Result<(), TaskClosedEvent<TReachErr, THandlerErr>>,
        handler: Option<THandler>,
    },
    NodeReached {
        id: TaskId,
        peer_id: PeerId,
    },
    NodeEvent {
        id: TaskId,
        event: TOutEvent,
    },
}
Expand description

Event that can happen on the HandledNodesTasks.

Variants

TaskClosed

Fields

id: TaskId

Identifier of the task that closed.

result: Result<(), TaskClosedEvent<TReachErr, THandlerErr>>

What happened.

handler: Option<THandler>

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

A task has been closed.

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

NodeReached

Fields

id: TaskId

Identifier of the task that succeeded.

peer_id: PeerId

Identifier of the node.

A task has successfully connected to a node.

NodeEvent

Fields

id: TaskId

Identifier of the task that produced the event.

event: TOutEvent

The produced event.

A task has produced an event.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.