Struct websocket::async::futures::stream::Wait [] [src]

#[must_use = "iterators do nothing unless advanced"]
pub struct Wait<S> { /* fields omitted */ }

A stream combinator which converts an asynchronous stream to a blocking iterator.

Created by the Stream::wait method, this function transforms any stream into a standard iterator. This is implemented by blocking the current thread while items on the underlying stream aren't ready yet.

Methods

impl<S> Wait<S>
[src]

[src]

Acquires a reference to the underlying stream that this combinator is pulling from.

[src]

Acquires a mutable reference to the underlying stream that this combinator is pulling from.

Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this combinator.

[src]

Consumes this combinator, returning the underlying stream.

Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.

Trait Implementations

impl<S> Debug for Wait<S> where
    S: Debug
[src]

[src]

Formats the value using the given formatter.

impl<S> Iterator for Wait<S> where
    S: Stream
[src]

[src]