[][src]Struct blocking_permit::Cleaver

#[must_use = "streams do nothing unless polled"]pub struct Cleaver<B, E, St> where
    B: Splittable + Unpin,
    St: Stream<Item = Result<B, E>>, 
{ /* fields omitted */ }

A Stream adapter that splits buffers from a source to a given, maximum length.

This may be useful to limit the amount of time spent processing each Item of a Splittable stream. This is enabled via the cleaver feature.

Implementations

impl<B, E, St> Cleaver<B, E, St> where
    B: Splittable + Unpin,
    St: Stream<Item = Result<B, E>>, 
[src]

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

Construct with source and maximum size to split on.

The size to split on must be at least 1.

Trait Implementations

impl<B, E, St> Debug for Cleaver<B, E, St> where
    B: Splittable + Unpin,
    St: Stream<Item = Result<B, E>> + Debug
[src]

impl<B, E, St> Stream for Cleaver<B, E, St> where
    B: Splittable + Unpin,
    St: Stream<Item = Result<B, E>>, 
[src]

type Item = Result<B, E>

Values yielded by the stream.

Auto Trait Implementations

impl<B, E, St> RefUnwindSafe for Cleaver<B, E, St> where
    B: RefUnwindSafe,
    St: RefUnwindSafe
[src]

impl<B, E, St> Send for Cleaver<B, E, St> where
    B: Send,
    St: Send
[src]

impl<B, E, St> Sync for Cleaver<B, E, St> where
    B: Sync,
    St: Sync
[src]

impl<B, E, St> Unpin for Cleaver<B, E, St> where
    St: Unpin
[src]

impl<B, E, St> UnwindSafe for Cleaver<B, E, St> where
    B: UnwindSafe,
    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