Struct Reader
struct Reader<R, D> { ... }
Implements the Read API around an Operation.
This can be used to wrap a raw in-memory operation in a read-focused API.
It can wrap either a compression or decompression operation, and pulls
input data from a wrapped Read.
Implementations
impl<R, D> Reader<R, D>
fn new(reader: R, operation: D) -> SelfCreates a new
Reader.readerwill be used to pull input data for the given operation.fn set_single_frame(self: &mut Self)Sets
selfto stop after the first decoded frame.fn operation_mut(self: &mut Self) -> &mut DReturns a mutable reference to the underlying operation.
fn reader_mut(self: &mut Self) -> &mut RReturns a mutable reference to the underlying reader.
fn reader(self: &Self) -> &RReturns a reference to the underlying reader.
fn into_inner(self: Self) -> RReturns the inner reader.
fn flush(self: &mut Self, output: &mut [u8]) -> Result<usize> where D: OperationFlush any internal buffer.
For encoders, this ensures all input consumed so far is compressed.
impl<R, D> Freeze for Reader<R, D>
impl<R, D> Read for Reader<R, D>
fn read(self: &mut Self, buf: &mut [u8]) -> Result<usize>
impl<R, D> RefUnwindSafe for Reader<R, D>
impl<R, D> Send for Reader<R, D>
impl<R, D> Sync for Reader<R, D>
impl<R, D> Unpin for Reader<R, D>
impl<R, D> UnsafeUnpin for Reader<R, D>
impl<R, D> UnwindSafe for Reader<R, D>
impl<T> Any for Reader<R, D>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Reader<R, D>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Reader<R, D>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Reader<R, D>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for Reader<R, D>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Reader<R, D>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Reader<R, D>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>