[][src]Struct yazi::EncoderStream

pub struct EncoderStream<'a, S: Sink> { /* fields omitted */ }

Compression stream combining an encoder context with an output.

See the crate level compression section for detailed usage.

Implementations

impl<'a, S: Sink> EncoderStream<'a, S>[src]

pub fn write(&mut self, buf: &[u8]) -> Result<(), Error>[src]

Writes the specified buffer to the stream, producing compressed data in the output.

pub fn compressed_size(&self) -> u64[src]

Returns the number of compressed bytes that have been written to the output.

pub fn finish(self) -> Result<u64, Error>[src]

Consumes the stream, flushing any input that may be buffered and any remaining output. Returns the total number of compressed bytes written to the output.

Trait Implementations

impl<'a, S: Sink> Drop for EncoderStream<'a, S>[src]

impl<'a, S: Sink> Write for EncoderStream<'a, S>[src]

Auto Trait Implementations

impl<'a, S> RefUnwindSafe for EncoderStream<'a, S> where
    S: RefUnwindSafe

impl<'a, S> Send for EncoderStream<'a, S> where
    S: Send

impl<'a, S> Sync for EncoderStream<'a, S> where
    S: Sync

impl<'a, S> Unpin for EncoderStream<'a, S> where
    S: Unpin

impl<'a, S> !UnwindSafe for EncoderStream<'a, S>

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<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.