pub struct CollectionStream<TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> { /* fields omitted */ }Implementation of Stream that handles a collection of nodes.
impl<TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> CollectionStream<TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> | [src] |
Creates a new empty collection.
pub fn add_reach_attempt<TFut, TMuxer>( &mut self, future: TFut, handler: THandler ) -> ReachAttemptId where TFut: Future<Item = (PeerId, TMuxer), Error = TReachErr> + Send + 'static, THandler: IntoNodeHandler + Send + 'static, THandler::Handler: NodeHandler<Substream = Substream<TMuxer>, InEvent = TInEvent, OutEvent = TOutEvent, Error = THandlerErr> + Send + 'static, <THandler::Handler as NodeHandler>::OutboundOpenInfo: Send + 'static, TReachErr: Error + Send + 'static, THandlerErr: Error + Send + 'static, TInEvent: Send + 'static, TOutEvent: Send + 'static, TMuxer: StreamMuxer + Send + Sync + 'static, TMuxer::OutboundSubstream: Send + 'static, | [src] |
Adds to the collection a future that tries to reach a remote.
This method spawns a task dedicated to resolving this future and processing the node's
events.
Interrupts a reach attempt.
Returns Ok if something was interrupted, and Err if the ID is not or no longer valid.
Sends an event to all nodes.
Grants access to an object that allows controlling a peer of the collection.
Returns None if we don't have a connection to this peer.
Returns true if we are connected to the given peer.
This will return true only after a NodeReached event has been produced by poll().
Returns a list of all the active connections.
Does not include reach attempts that haven't reached any target yet.
Provides an API similar to Stream, except that it cannot error.
Note: we use a regular poll method instead of implementing Stream in order to
remove the Err variant, but also because we want the CollectionStream to stay
borrowed if necessary.
impl<TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> Debug for CollectionStream<TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> | [src] |
Formats the value using the given formatter. Read more
impl<TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> Send for CollectionStream<TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> where THandler: Send, THandlerErr: Send, TInEvent: Send, TOutEvent: Send, TReachErr: Send, | |
impl<TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> !Sync for CollectionStream<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