pub struct LazyDecoder<'a> { /* private fields */ }Expand description
A decoder that only consumes bytes CHUNK_SIZE at a time. Useful to decode large files while maintaining memory usage low.
The decoder keeps an internal state with the bytes that have been read but not consumed, and a
handle to a source that implements std::io::Read.
See Self::from_file for example, to lazily read and decode from a (large) file.
Implementations§
Source§impl<'a> LazyDecoder<'a>
impl<'a> LazyDecoder<'a>
Auto Trait Implementations§
impl<'a> Freeze for LazyDecoder<'a>
impl<'a> !RefUnwindSafe for LazyDecoder<'a>
impl<'a> !Send for LazyDecoder<'a>
impl<'a> !Sync for LazyDecoder<'a>
impl<'a> Unpin for LazyDecoder<'a>
impl<'a> UnsafeUnpin for LazyDecoder<'a>
impl<'a> !UnwindSafe for LazyDecoder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more