pub struct Limit<T> { /* private fields */ }
Expand description
Limits the stream to a maximum amount of data.
Trait Implementations
sourceimpl<T> BufStream for Limit<T> where
T: BufStream,
impl<T> BufStream for Limit<T> where
T: BufStream,
type Error = LimitError<T::Error>
type Error = LimitError<T::Error>
The error type this BufStream
might generate.
Auto Trait Implementations
impl<T> RefUnwindSafe for Limit<T> where
T: RefUnwindSafe,
impl<T> Send for Limit<T> where
T: Send,
impl<T> Sync for Limit<T> where
T: Sync,
impl<T> Unpin for Limit<T> where
T: Unpin,
impl<T> UnwindSafe for Limit<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> BufStreamExt for T where
T: BufStream,
impl<T> BufStreamExt for T where
T: BufStream,
sourcefn chain<T>(self, other: T) -> Chain<Self, T> where
Self: Sized,
T: BufStream<Error = Self::Error>,
fn chain<T>(self, other: T) -> Chain<Self, T> where
Self: Sized,
T: BufStream<Error = Self::Error>,
Takes two buf streams and creates a new buf stream over both in sequence. Read more
sourcefn collect<T>(self) -> Collect<Self, T> where
Self: Sized,
T: FromBufStream<Self::Item>,
fn collect<T>(self) -> Collect<Self, T> where
Self: Sized,
T: FromBufStream<Self::Item>,
Consumes all data from self
, storing it in byte storage of type T
. Read more
sourcefn limit(self, amount: u64) -> Limit<Self> where
Self: Sized,
fn limit(self, amount: u64) -> Limit<Self> where
Self: Sized,
Limit the number of bytes that the stream can yield. Read more
sourcefn into_stream(self) -> IntoStream<Self> where
Self: Sized,
fn into_stream(self) -> IntoStream<Self> where
Self: Sized,
Creates a Stream
from a BufStream
. Read more