pub struct ZlibEncoder<S> { /* private fields */ }
👎Deprecated since 0.3.8: See async-compression::stream docs for migration
Available on crate features stream and zlib only.
Expand description

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

Implementations

👎Deprecated since 0.3.8: See async-compression::stream docs for migration

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

👎Deprecated since 0.3.8: See async-compression::stream docs for migration

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

👎Deprecated since 0.3.8: See async-compression::stream docs for migration

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

👎Deprecated since 0.3.8: See async-compression::stream docs for migration

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.

👎Deprecated since 0.3.8: See async-compression::stream docs for migration

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.

👎Deprecated since 0.3.8: See async-compression::stream docs for migration

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

Formats the value using the given formatter. Read more
Values yielded by the stream.
Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
Returns the bounds on the remaining length of the stream. 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.

Consumes and returns the next value in the stream or None if the stream is finished. Read more
Consumes and returns the next item in the stream. If an error is encountered before the next item, the error is returned instead. Read more
Maps this stream’s items to a different type, returning a new stream of the resulting type. Read more
Combine two streams into one by interleaving the output of both as it is produced. Read more
Filters the values produced by this stream according to the provided predicate. Read more
Filters the values produced by this stream while simultaneously mapping them to a different type according to the provided closure. Read more
Creates a stream which ends after the first None. Read more
Creates a new stream of at most n items of the underlying stream. Read more
Take elements from this stream while the provided predicate resolves to true. Read more
Creates a new stream that will skip the n first items of the underlying stream. Read more
Skip elements from the underlying stream while the provided predicate resolves to true. Read more
Tests if every element of the stream matches a predicate. Read more
Tests if any element of the stream matches a predicate. Read more
Combine two streams into one by first returning all values from the first stream then all values from the second stream. Read more
A combinator that applies a function to every element in a stream producing a single, final value. Read more
Drain stream pushing all emitted values into a collection. Read more
Consumes and returns the next value in the stream or None if the stream is finished. Read more
Consumes and returns the next item in the stream. If an error is encountered before the next item, the error is returned instead. Read more
Maps this stream’s items to a different type, returning a new stream of the resulting type. Read more
Combine two streams into one by interleaving the output of both as it is produced. Read more
Filters the values produced by this stream according to the provided predicate. Read more
Filters the values produced by this stream while simultaneously mapping them to a different type according to the provided closure. Read more
Creates a stream which ends after the first None. Read more
Creates a new stream of at most n items of the underlying stream. Read more
Take elements from this stream while the provided predicate resolves to true. Read more
Creates a new stream that will skip the n first items of the underlying stream. Read more
Skip elements from the underlying stream while the provided predicate resolves to true. Read more
Tests if every element of the stream matches a predicate. Read more
Tests if any element of the stream matches a predicate. Read more
Combine two streams into one by first returning all values from the first stream then all values from the second stream. Read more
A combinator that applies a function to every element in a stream producing a single, final value. Read more
Drain stream pushing all emitted values into a collection. Read more
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.
The type of successful values yielded by this future
The type of failures yielded by this future
Poll this TryStream as if it were a Stream. Read more