[−][src]Struct yazi::EncoderStream
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]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>
1.36.0[src]
fn is_write_vectored(&self) -> bool
[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
[src]
fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Auto Trait Implementations
impl<'a, S> RefUnwindSafe for EncoderStream<'a, S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<'a, S> Send for EncoderStream<'a, S> where
S: Send,
S: Send,
impl<'a, S> Sync for EncoderStream<'a, S> where
S: Sync,
S: Sync,
impl<'a, S> Unpin for EncoderStream<'a, S> where
S: Unpin,
S: Unpin,
impl<'a, S> !UnwindSafe for EncoderStream<'a, S>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,