Struct zstd::stream::zio::Reader [−][src]
pub struct Reader<R, D> { /* fields omitted */ }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>[src]
impl<R, D> Reader<R, D>[src]pub fn new(reader: R, operation: D) -> Self[src]
Creates a new Reader.
reader will be used to pull input data for the given operation.
pub fn set_single_frame(&mut self)[src]
Sets self to stop after the first decoded frame.
pub fn operation_mut(&mut self) -> &mut D[src]
Returns a mutable reference to the underlying operation.
pub fn reader_mut(&mut self) -> &mut R[src]
Returns a mutable reference to the underlying reader.
pub fn reader(&self) -> &R[src]
Returns a reference to the underlying reader.
pub fn into_inner(self) -> R[src]
Returns the inner reader.
Trait Implementations
impl<R, D> Read for Reader<R, D> where
R: BufRead,
D: Operation, [src]
impl<R, D> Read for Reader<R, D> where
R: BufRead,
D: Operation, [src]fn read(&mut self, buf: &mut [u8]) -> Result<usize>[src]
pub fn read_vectored(
&mut self,
bufs: &mut [IoSliceMut<'_>]
) -> Result<usize, Error>1.36.0[src]
&mut self,
bufs: &mut [IoSliceMut<'_>]
) -> Result<usize, Error>
pub fn is_read_vectored(&self) -> bool[src]
pub unsafe fn initializer(&self) -> Initializer[src]
pub fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>1.0.0[src]
pub fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>1.0.0[src]
pub fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>1.6.0[src]
pub fn by_ref(&mut self) -> &mut Self1.0.0[src]
pub fn bytes(self) -> Bytes<Self>1.0.0[src]
pub fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read, 1.0.0[src]
R: Read,
pub fn take(self, limit: u64) -> Take<Self>1.0.0[src]
Auto Trait Implementations
impl<R, D> RefUnwindSafe for Reader<R, D> where
D: RefUnwindSafe,
R: RefUnwindSafe,
D: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, D> Send for Reader<R, D> where
D: Send,
R: Send,
D: Send,
R: Send,
impl<R, D> Sync for Reader<R, D> where
D: Sync,
R: Sync,
D: Sync,
R: Sync,
impl<R, D> Unpin for Reader<R, D> where
D: Unpin,
R: Unpin,
D: Unpin,
R: Unpin,
impl<R, D> UnwindSafe for Reader<R, D> where
D: UnwindSafe,
R: UnwindSafe,
D: UnwindSafe,
R: UnwindSafe,