[−]Struct async_compression::stream::BrotliEncoder
feature="stream"
and feature="brotli"
only.A brotli encoder, or compressor.
This structure implements a Stream
interface and will read
uncompressed data from an underlying stream and emit a stream of compressed data.
Methods
impl<S: Stream<Item = Result<Bytes>>> BrotliEncoder<S>
[src]
pub fn new(reader: S, level: u32) -> Self
[src]
feature="stream"
only.Creates a new encoder which will read uncompressed data from the given stream and emit a compressed stream.
The level
argument here is typically 0-11.
pub fn from_params(inner: S, params: &CompressParams) -> Self
[src]
feature="stream"
only.Creates a new encoder which will read uncompressed data from the given stream and emit a compressed stream.
pub fn get_ref(&self) -> &S
[src]
feature="stream"
only.Acquires a reference to the underlying stream that this encoder is wrapping.
pub fn get_mut(&mut self) -> &mut S
[src]
feature="stream"
only.Acquires a mutable reference to the underlying stream that this encoder is wrapping.
Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this encoder.
pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut S>
[src]
feature="stream"
only.Acquires a pinned mutable reference to the underlying stream that this encoder is wrapping.
Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this encoder.
pub fn into_inner(self) -> S
[src]
feature="stream"
only.Consumes this encoder returning the underlying stream.
Note that this may discard internal state of this encoder, so care should be taken to avoid losing resources when this is called.
Trait Implementations
impl<'__pin, S: Stream<Item = Result<Bytes>>> Unpin for BrotliEncoder<S> where
__Origin<'__pin, S>: Unpin,
__Origin<'__pin, S>: Unpin,
impl<S: Debug + Stream<Item = Result<Bytes>>> Debug for BrotliEncoder<S>
[src]
impl<S: Stream<Item = Result<Bytes>>> Stream for BrotliEncoder<S>
[src]
Auto Trait Implementations
impl<S> Send for BrotliEncoder<S> where
S: Send,
S: Send,
impl<S> Sync for BrotliEncoder<S> where
S: Sync,
S: Sync,
impl<S> UnwindSafe for BrotliEncoder<S> where
S: UnwindSafe,
S: UnwindSafe,
impl<S> RefUnwindSafe for BrotliEncoder<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
Blanket Implementations
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 = !
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<S, T, E> TryStream for S where
S: Stream<Item = Result<T, E>> + ?Sized,
[src]
S: Stream<Item = Result<T, E>> + ?Sized,