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]
fn get_ref(&self) -> &S
[src]
Acquires a reference to the underlying stream that this combinator is pulling from.
fn get_mut(&mut self) -> &mut S
[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.
fn into_inner(self) -> S
[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]
S: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl<S> Iterator for Wait<S> where
S: Stream,
[src]
S: Stream,