[−][src]Struct futures_util::stream::Take
A stream combinator which returns a maximum number of elements.
This structure is produced by the Stream::take
method.
Methods
impl<St: Stream> Take<St>
[src]
[−]
impl<St: Stream> Take<St>
ⓘImportant traits for &'a mut Wpub fn get_ref(&self) -> &St
[src]
[−]
ⓘImportant traits for &'a mut W
pub fn get_ref(&self) -> &St
Acquires a reference to the underlying stream that this combinator is pulling from.
ⓘImportant traits for &'a mut Wpub fn get_mut(&mut self) -> &mut St
[src]
[−]
ⓘImportant traits for &'a mut W
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: Debug> Debug for Take<St>
[src]
[+]
impl<St: Debug> Debug for Take<St>
impl<St: Unpin> Unpin for Take<St>
[src]
impl<St: Unpin> Unpin for Take<St>
impl<St> Stream for Take<St> where
St: Stream,
[src]
[+]
impl<St> Stream for Take<St> where
St: Stream,