pub enum CollectionEvent<'a, TInEvent: 'a, TOutEvent: 'a, THandler: 'a, TReachErr, THandlerErr> {
NodeReached(CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr>),
NodeClosed {
peer_id: PeerId,
},
NodeError {
peer_id: PeerId,
error: HandledNodeError<THandlerErr>,
},
ReachError {
id: ReachAttemptId,
error: TReachErr,
handler: THandler,
},
NodeEvent {
peer_id: PeerId,
event: TOutEvent,
},
}Event that can happen on the CollectionStream.
A connection to a node has succeeded. You must use the provided event in order to accept
the connection.
A connection to a node has been closed.
This happens once both the inbound and outbound channels are closed, and no more outbound
substream attempt is pending.
Fields of NodeClosed
A connection to a node has errored.
Can only happen after a node has been successfully reached.
Fields of NodeError
An error happened on the future that was trying to reach a node.
Fields of ReachError
Identifier of the reach attempt that failed.
Error that happened on the future.
handler: THandlerThe handler that was passed to add_reach_attempt.
A node has produced an event.
Fields of NodeEvent
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> Debug for CollectionEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> where TOutEvent: Debug, TReachErr: Debug, THandlerErr: Debug, | [src] |
Formats the value using the given formatter. Read more
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> Send for CollectionEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> where THandler: Send, THandlerErr: Send, TInEvent: Send, TOutEvent: Send, TReachErr: Send, | |
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> !Sync for CollectionEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> | |
🔬 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