IntoCompressedWriter

Trait IntoCompressedWriter 

Source
pub trait IntoCompressedWriter {
    // Provided method
    fn into_compressed_writer(
        self,
        compression_type: CompressionType,
    ) -> CompressedWriter
       where Self: AsyncWrite + Unpin + Send + 'static + Sized { ... }
}
Expand description

A trait for converting async writers into compressed writers.

This trait is automatically implemented for all types that implement [AsyncWrite].

Provided Methods§

Source

fn into_compressed_writer( self, compression_type: CompressionType, ) -> CompressedWriter
where Self: AsyncWrite + Unpin + Send + 'static + Sized,

Converts this writer into a CompressedWriter with the specified compression type.

§Arguments
  • self - The underlying writer to wrap with compression
  • compression_type - The type of compression to apply

Implementors§

Source§

impl<W: AsyncWrite + Unpin + Send + 'static> IntoCompressedWriter for W