Struct futures::stream::FilterMap[][src]

#[must_use = "streams do nothing unless polled"]
pub struct FilterMap<St, Fut, F> where
    F: FnMut(<St as Stream>::Item) -> Fut,
    Fut: Future,
    St: Stream
{ /* fields omitted */ }

A combinator used to filter the results of a stream and simultaneously map them to a different type.

This structure is returned by the Stream::filter_map method.

Methods

impl<St, Fut, F> FilterMap<St, Fut, F> where
    F: FnMut(<St as Stream>::Item) -> Fut,
    Fut: Future,
    St: Stream
[src]

Important traits for &'a mut I

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

Important traits for &'a mut I

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.

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<St, Fut, F> Unpin for FilterMap<St, Fut, F> where
    F: FnMut(<St as Stream>::Item) -> Fut,
    Fut: Future + Unpin,
    St: Stream + Unpin
[src]

impl<St, Fut, F> Debug for FilterMap<St, Fut, F> where
    F: Debug + FnMut(<St as Stream>::Item) -> Fut,
    Fut: Debug + Future,
    St: Debug + Stream
[src]

Formats the value using the given formatter. Read more

impl<St, Fut, F, T> Stream for FilterMap<St, Fut, F> where
    F: FnMut(<St as Stream>::Item) -> Fut,
    Fut: Future<Output = Option<T>>,
    St: Stream
[src]

Values yielded by the stream.

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more

Auto Trait Implementations

impl<St, Fut, F> Send for FilterMap<St, Fut, F> where
    F: Send,
    Fut: Send,
    St: Send

impl<St, Fut, F> Sync for FilterMap<St, Fut, F> where
    F: Sync,
    Fut: Sync,
    St: Sync