[][src]Struct compress::lz4::Decoder

pub struct Decoder<R> {
    pub r: R,
    // some fields omitted
}

This structure is used to decode a stream of LZ4 blocks. This wraps an internal reader which is read from when this decoder's read method is called.

Fields

r: R

The internally wrapped reader. This is exposed so it may be moved out of. Note that if data is read from the reader while decoding is in progress the output stream will get corrupted.

Implementations

impl<R: Read + Sized> Decoder<R>[src]

pub fn new(r: R) -> Decoder<R>

Notable traits for Decoder<R>

impl<R: Read> Read for Decoder<R>
[src]

Creates a new decoder which will read data from the given stream. The inner stream can be re-acquired by moving out of the r field of this structure.

pub fn reset(&mut self)[src]

Resets this decoder back to its initial state. Note that the underlying stream is not seeked on or has any alterations performed on it.

pub fn eof(&mut self) -> bool[src]

Tests whether the end of this LZ4 stream has been reached

Trait Implementations

impl<R: Read> Read for Decoder<R>[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for Decoder<R> where
    R: RefUnwindSafe

impl<R> Send for Decoder<R> where
    R: Send

impl<R> Sync for Decoder<R> where
    R: Sync

impl<R> Unpin for Decoder<R> where
    R: Unpin

impl<R> UnwindSafe for Decoder<R> where
    R: UnwindSafe

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<R> ReadBytesExt for R where
    R: Read + ?Sized
[src]

impl<T> ReadExact for T where
    T: Read
[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<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]