Struct Buffered

#[must_use = "streams do nothing unless polled"]
pub struct Buffered<St>
where
    St: Stream,
    St::Item: Future, { /* private fields */ }

Stream for the buffered method.

Implementations

impl<St> Buffered<St> where St: Stream, St::Item: Future,

fn get_ref(&self) -> &St

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

fn get_mut(&mut self) -> &mut St

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

Note that care must be taken to avoid tampering with the state of the sink or stream which may otherwise confuse this combinator.

fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut St>

Acquires a pinned mutable reference to the underlying sink or stream that this combinator is pulling from.

Note that care must be taken to avoid tampering with the state of the sink or stream which may otherwise confuse this combinator.

fn into_inner(self) -> St

Consumes this combinator, returning the underlying sink or 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<'__pin, St> Unpin for Buffered<St> where PinnedFieldsOf<__Origin<'__pin, St>>: Unpin, St: Stream, St::Item: Future,

impl<S, Item> Sink<Item> for Buffered<S> where S: Stream + Sink<Item>, S::Item: Future,

type Error = <S as Sink<Item>>::Error;
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), Self::Error>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

impl<St> Debug for Buffered<St> where St: Stream + Debug, St::Item: Future,

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<St> FusedStream for Buffered<St> where St: Stream, St::Item: Future,

fn is_terminated(&self) -> bool

impl<St> Stream for Buffered<St> where St: Stream, St::Item: Future,

type Item = <<St as Stream>::Item as Future>::Output;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>
fn size_hint(&self) -> (usize, Option<usize>)

Auto Trait Implementations

impl<St> !Freeze for Buffered<St>

impl<St> !RefUnwindSafe for Buffered<St>

impl<St> !UnwindSafe for Buffered<St>

impl<St> Send for Buffered<St> where Fuse<St>: Send, FuturesOrdered<<St as Stream>::Item>: Send,

impl<St> Sync for Buffered<St> where Fuse<St>: Sync, FuturesOrdered<<St as Stream>::Item>: Sync,

impl<St> UnsafeUnpin for Buffered<St> where Fuse<St>: UnsafeUnpin, FuturesOrdered<<St as Stream>::Item>: UnsafeUnpin,

Blanket Implementations

impl<S> TryStreamExt for Buffered<St> where S: TryStream + ?Sized,

impl<S, T, E> TryStream for Buffered<St> where S: Stream<Item = Result<T, E>> + ?Sized,

type Ok = T;
type Error = E;
fn try_poll_next(self: Pin<&mut S>, cx: &mut Context<'_>) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>

impl<T> Any for Buffered<St> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Buffered<St> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Buffered<St> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for Buffered<St>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> StreamExt for Buffered<St> where T: Stream + ?Sized,

impl<T, Item> SinkExt<Item> for Buffered<St> where T: Sink<Item> + ?Sized,

impl<T, U> Into<U> for Buffered<St> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Buffered<St> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Buffered<St> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>