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
.
A task has been closed.
This happens once the node handler closes or an error happens.
Fields of TaskClosed
Identifier of the task that closed.
handler: Option<TIntoHandler>
If the task closed before reaching the node, this contains the handler that was passed
to add_reach_attempt
.
A task has successfully connected to a node.
Fields of NodeReached
Identifier of the task that succeeded.
A task has produced an event.
Fields of NodeEvent
Identifier of the task that produced the event.
Formats the value using the given formatter. Read more
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, | |
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static