pub struct BrotliEncoder<R> { /* private fields */ }
Available on crate features futures-io and brotli only.
Expand description

A brotli encoder, or compressor.

This structure implements an AsyncRead interface and will read uncompressed data from an underlying stream and emit a stream of compressed data.

Implementations

Creates a new encoder which will read uncompressed data from the given stream and emit a compressed stream.

Creates a new encoder which will read uncompressed data from the given stream and emit a compressed stream.

Acquires a reference to the underlying reader that this encoder is wrapping.

Acquires a mutable reference to the underlying reader that this encoder is wrapping.

Note that care must be taken to avoid tampering with the state of the reader which may otherwise confuse this encoder.

Acquires a pinned mutable reference to the underlying reader that this encoder is wrapping.

Note that care must be taken to avoid tampering with the state of the reader which may otherwise confuse this encoder.

Consumes this encoder returning the underlying reader.

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

Attempt to read from the AsyncRead into buf. Read more

Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.