Struct futures::stream::Map [−][src]
#[must_use = "streams do nothing unless polled"]pub struct Map<St, F> { /* fields omitted */ }
A stream combinator which will change the type of a stream from one type to another.
This is produced by the Stream::map
method.
Methods
impl<St, T, F> Map<St, F> where
F: FnMut(<St as Stream>::Item) -> T,
St: Stream,
[src]
impl<St, T, F> Map<St, F> where
F: FnMut(<St as Stream>::Item) -> T,
St: Stream,
ⓘImportant traits for &'a mut Ipub fn get_ref(&self) -> &St
[src]
pub fn get_ref(&self) -> &St
Acquires a reference to the underlying stream that this combinator is pulling from.
ⓘImportant traits for &'a mut Ipub fn get_mut(&mut self) -> &mut St
[src]
pub fn get_mut(&mut self) -> &mut St
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.
pub fn into_inner(self) -> St
[src]
pub fn into_inner(self) -> St
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, F> Unpin for Map<St, F> where
St: Unpin,
[src]
impl<St, F> Unpin for Map<St, F> where
St: Unpin,
impl<St, F> Debug for Map<St, F> where
F: Debug,
St: Debug,
[src]
impl<St, F> Debug for Map<St, F> where
F: Debug,
St: Debug,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<St, F, T> Stream for Map<St, F> where
F: FnMut(<St as Stream>::Item) -> T,
St: Stream,
[src]
impl<St, F, T> Stream for Map<St, F> where
F: FnMut(<St as Stream>::Item) -> T,
St: Stream,
type Item = T
Values yielded by the stream.
fn poll_next(self: PinMut<Map<St, F>>, cx: &mut Context) -> Poll<Option<T>>
[src]
fn poll_next(self: PinMut<Map<St, F>>, cx: &mut Context) -> Poll<Option<T>>
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