[][src]Struct blocking_permit::YieldStream

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

A Stream adapter that yields after every Poll::Ready(Some(_)) result from its source.

The wrapper may be useful to ensure that a Future that polls a Stream (directly or indirectly) yields (return Poll::Pending) between items. If the source stream already returns Poll::Pending then this will not add further Poll::Pending returns.

The type is enabled via the yield-stream feature.

Implementations

impl<St, I> YieldStream<St, I> where
    St: Stream<Item = I>, 
[src]

pub fn new(source: St) -> Self[src]

Construct with source to wrap.

Trait Implementations

impl<St: Debug, I: Debug> Debug for YieldStream<St, I> where
    St: Stream<Item = I>, 
[src]

impl<St, I> Stream for YieldStream<St, I> where
    St: Stream<Item = I>, 
[src]

type Item = I

Values yielded by the stream.

Auto Trait Implementations

impl<St, I> RefUnwindSafe for YieldStream<St, I> where
    St: RefUnwindSafe
[src]

impl<St, I> Send for YieldStream<St, I> where
    St: Send
[src]

impl<St, I> Sync for YieldStream<St, I> where
    St: Sync
[src]

impl<St, I> Unpin for YieldStream<St, I> where
    St: Unpin
[src]

impl<St, I> UnwindSafe for YieldStream<St, I> where
    St: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future