Struct futures::stream::Chunks [−][src]
#[must_use = "streams do nothing unless polled"]pub struct Chunks<St> where
St: Stream, { /* fields omitted */ }
An adaptor that chunks up elements in a vector.
This adaptor will buffer up a list of items in the stream and pass on the
vector used for buffering when a specified capacity has been reached. This
is created by the Stream::chunks
method.
Methods
impl<St> Chunks<St> where
St: Stream + Stream,
[src]
impl<St> Chunks<St> where
St: Stream + 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> Unpin for Chunks<St> where
St: Unpin + Stream,
[src]
impl<St> Unpin for Chunks<St> where
St: Unpin + Stream,
impl<St> Debug for Chunks<St> where
St: Debug + Stream,
<St as Stream>::Item: Debug,
[src]
impl<St> Debug for Chunks<St> where
St: Debug + Stream,
<St as Stream>::Item: 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> Stream for Chunks<St> where
St: Stream,
[src]
impl<St> Stream for Chunks<St> where
St: Stream,
type Item = Vec<<St as Stream>::Item>
Values yielded by the stream.
fn poll_next(
self: PinMut<Chunks<St>>,
cx: &mut Context
) -> Poll<Option<<Chunks<St> as Stream>::Item>>
[src]
fn poll_next(
self: PinMut<Chunks<St>>,
cx: &mut Context
) -> Poll<Option<<Chunks<St> as Stream>::Item>>
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