[][src]Struct libp2p::Swarm

pub struct Swarm<TTransport, TBehaviour, TTopology> where
    TBehaviour: NetworkBehaviour<TTopology>,
    TTransport: Transport
{ /* fields omitted */ }

Contains the state of the network, plus the way it should behave.

Methods

impl<TTransport, TBehaviour, TMuxer, TTopology> Swarm<TTransport, TBehaviour, TTopology> where
    TBehaviour: NetworkBehaviour<TTopology>,
    TMuxer: StreamMuxer + Send + Sync + 'static,
    TTopology: Topology,
    TTransport: Transport<Output = (PeerId, TMuxer)> + Clone,
    <TMuxer as StreamMuxer>::OutboundSubstream: Send,
    <TMuxer as StreamMuxer>::OutboundSubstream: 'static,
    <TMuxer as StreamMuxer>::Substream: Send,
    <TMuxer as StreamMuxer>::Substream: 'static,
    <TTransport as Transport>::Listener: Send,
    <TTransport as Transport>::Listener: 'static,
    <TTransport as Transport>::ListenerUpgrade: Send,
    <TTransport as Transport>::ListenerUpgrade: 'static,
    <TTransport as Transport>::Dial: Send,
    <TTransport as Transport>::Dial: 'static,
    <TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler: ProtocolsHandler,
    <TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler: Send,
    <TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InEvent: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InEvent: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutEvent: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutEvent: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::Error: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::Error: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundOpenInfo: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundOpenInfo: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol: InboundUpgrade<SubstreamRef<Arc<TMuxer>>>,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::Info: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::Info: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::InfoIter: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::InfoIter: 'static,
    <<<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Send,
    <<<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: Debug,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Future: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Future: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol: OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::Info: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::Info: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter: 'static,
    <<<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Send,
    <<<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Future: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Future: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: Debug,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: 'static,
    <NodeHandlerWrapper<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler> as NodeHandler>::OutboundOpenInfo: Send,
    <NodeHandlerWrapper<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler> as NodeHandler>::OutboundOpenInfo: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::Substream == SubstreamRef<Arc<TMuxer>>, 
[src]

Builds a new Swarm.

Returns the transport passed when building this object.

Starts listening on the given address.

Returns an error if the address is not supported. On success, returns an alternative version of the address.

Tries to dial the given address.

Returns an error if the address is not supported.

Tries to reach the given peer using the elements in the topology.

Has no effect if we are already connected to that peer, or if no address is known for the peer.

Returns an iterator that produces the list of addresses we're listening on.

Returns the peer ID of the swarm passed as parameter.

Returns the topology of the swarm.

Returns the topology of the swarm.

Trait Implementations

impl<TTransport, TBehaviour, TTopology> DerefMut for Swarm<TTransport, TBehaviour, TTopology> where
    TBehaviour: NetworkBehaviour<TTopology>,
    TTransport: Transport
[src]

impl<TTransport, TBehaviour, TMuxer, TTopology> Stream for Swarm<TTransport, TBehaviour, TTopology> where
    TBehaviour: NetworkBehaviour<TTopology>,
    TMuxer: StreamMuxer + Send + Sync + 'static,
    TTopology: Topology,
    TTransport: Transport<Output = (PeerId, TMuxer)> + Clone,
    <TMuxer as StreamMuxer>::OutboundSubstream: Send,
    <TMuxer as StreamMuxer>::OutboundSubstream: 'static,
    <TMuxer as StreamMuxer>::Substream: Send,
    <TMuxer as StreamMuxer>::Substream: 'static,
    <TTransport as Transport>::Listener: Send,
    <TTransport as Transport>::Listener: 'static,
    <TTransport as Transport>::ListenerUpgrade: Send,
    <TTransport as Transport>::ListenerUpgrade: 'static,
    <TTransport as Transport>::Dial: Send,
    <TTransport as Transport>::Dial: 'static,
    <TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler: ProtocolsHandler,
    <TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler: Send,
    <TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InEvent: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InEvent: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutEvent: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutEvent: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::Error: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::Error: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundOpenInfo: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundOpenInfo: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol: InboundUpgrade<SubstreamRef<Arc<TMuxer>>>,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Future: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Future: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: Debug,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::Info: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::Info: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::InfoIter: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::InfoIter: 'static,
    <<<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Send,
    <<<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol: OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Future: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Future: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: Debug,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<SubstreamRef<Arc<TMuxer>>>>::Error: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::Info: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::Info: 'static,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter: 'static,
    <<<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Send,
    <<<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: 'static,
    <NodeHandlerWrapper<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler> as NodeHandler>::OutboundOpenInfo: Send,
    <NodeHandlerWrapper<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler> as NodeHandler>::OutboundOpenInfo: 'static,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::Substream == SubstreamRef<Arc<TMuxer>>, 
[src]

The type of item this stream will yield on success.

The type of error this stream may generate.

Creates an iterator which blocks the current thread until each item of this stream is resolved. Read more

Converts this stream into a Future. Read more

Converts a stream of type T to a stream of type U. Read more

Converts a stream of error type T to a stream of error type U. Read more

Filters the values produced by this stream according to the provided predicate. Read more

Filters the values produced by this stream while simultaneously mapping them to a different type. Read more

Chain on a computation for when a value is ready, passing the resulting item to the provided closure f. Read more

Chain on a computation for when a value is ready, passing the successful results to the provided closure f. Read more

Chain on a computation for when an error happens, passing the erroneous result to the provided closure f. Read more

Collect all of the values of this stream into a vector, returning a future representing the result of that computation. Read more

Concatenate all results of a stream into a single extendable destination, returning a future representing the end result. Read more

Deprecated since 0.1.14

: please use Stream::concat2 instead

Concatenate all results of a stream into a single extendable destination, returning a future representing the end result. Read more

Execute an accumulating computation over a stream, collecting all the values into one final result. Read more

Flattens a stream of streams into just one continuous stream. Read more

Skip elements on this stream while the predicate provided resolves to true. Read more

Take elements from this stream while the predicate provided resolves to true. Read more

Runs this stream to completion, executing the provided closure for each element on the stream. Read more

Map this stream's error to any error implementing From for this stream's Error, returning a new stream. Read more

Creates a new stream of at most amt items of the underlying stream. Read more

Creates a new stream which skips amt items of the underlying stream. Read more

Fuse a stream such that poll will never again be called once it has finished. Read more

Borrows a stream, rather than consuming it. Read more

Catches unwinding panics while polling the stream. Read more

An adaptor for creating a buffered list of pending futures. Read more

An adaptor for creating a buffered list of pending futures (unordered). Read more

Deprecated

: functionality provided by select now

An adapter for merging the output of two streams. Read more

An adapter for zipping two streams together. Read more

Adapter for chaining two stream. Read more

Creates a new stream which exposes a peek method. Read more

An adaptor for chunking up items of the stream inside a vector. Read more

Creates a stream that selects the next element from either this stream or the provided one, whichever is ready first. Read more

A future that completes after the given stream has been fully processed into the sink, including flushing. Read more

Splits this Stream + Sink object into separate Stream and Sink objects. Read more

Do something with each item of this stream, afterwards passing it on. Read more

Do something with the error of this stream, afterwards passing it on. Read more

impl<TTransport, TBehaviour, TTopology> Deref for Swarm<TTransport, TBehaviour, TTopology> where
    TBehaviour: NetworkBehaviour<TTopology>,
    TTransport: Transport
[src]

The resulting type after dereferencing.

Auto Trait Implementations

impl<TTransport, TBehaviour, TTopology> Send for Swarm<TTransport, TBehaviour, TTopology> where
    TBehaviour: Send,
    TTopology: Send,
    TTransport: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::Error: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::Substream>>::Future: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::Substream>>::Future: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InEvent: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol: Send + UpgradeInfo,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::Info: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::Info: Send,
    <<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter: IntoIterator,
    <<<<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Iterator + Send,
    <TTransport as Transport>::Listener: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutEvent: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundOpenInfo: Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::OutboundProtocol: Send + UpgradeInfo,
    <TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler: ProtocolsHandler + Send,
    <<TBehaviour as NetworkBehaviour<TTopology>>::ProtocolsHandler as ProtocolsHandler>::Substream: AsyncRead + AsyncWrite + Send

impl<TTransport, TBehaviour, TTopology> !Sync for Swarm<TTransport, TBehaviour, TTopology>

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]

🔬 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]

🔬 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

Should always be Self

impl<T> Erased for T

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

Throttle down the stream by enforcing a fixed delay between items. Read more

Creates a new stream which allows self until timeout. Read more

impl<T> Erased for T

impl<T> ListenExt for T where
    T: Stream

Turns a listening stream that you can get from TcpListener::incoming into a stream that supresses errors and sleeps on resource shortage, effectively allowing listening stream to resume on error. Read more

Turns a stream of protocol handlers usually produced by mapping a stream of accepted cnnec Read more

impl<T> Typeable for T where
    T: Any

Get the TypeId of this object.