pub struct BrotliEncoder<S> { /* private fields */ }See async-compression::stream docs for migration
stream and brotli only.Expand description
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.
Implementations§
Source§impl<S: Stream<Item = Result<Bytes>>> BrotliEncoder<S>
impl<S: Stream<Item = Result<Bytes>>> BrotliEncoder<S>
Sourcepub fn new(inner: S) -> Self
👎Deprecated since 0.3.8: See async-compression::stream docs for migration
pub fn new(inner: S) -> Self
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.
Sourcepub fn with_quality(inner: S, level: Level) -> Self
👎Deprecated since 0.3.8: See async-compression::stream docs for migration
pub fn with_quality(inner: S, level: Level) -> Self
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.
Sourcepub fn get_ref(&self) -> &S
👎Deprecated since 0.3.8: See async-compression::stream docs for migration
pub fn get_ref(&self) -> &S
See async-compression::stream docs for migration
Acquires a reference to the underlying stream that this encoder is wrapping.
Sourcepub fn get_mut(&mut self) -> &mut S
👎Deprecated since 0.3.8: See async-compression::stream docs for migration
pub fn get_mut(&mut self) -> &mut S
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.
Sourcepub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut S>
👎Deprecated since 0.3.8: See async-compression::stream docs for migration
pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut S>
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.
Sourcepub fn into_inner(self) -> S
👎Deprecated since 0.3.8: See async-compression::stream docs for migration
pub fn into_inner(self) -> S
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§
Source§impl<S: Debug> Debug for BrotliEncoder<S>
impl<S: Debug> Debug for BrotliEncoder<S>
Source§impl<S: Stream<Item = Result<Bytes>>> Stream for BrotliEncoder<S>
impl<S: Stream<Item = Result<Bytes>>> Stream for BrotliEncoder<S>
impl<'__pin, S> Unpin for BrotliEncoder<S>where
PinnedFieldsOf<__Origin<'__pin, S>>: Unpin,
Auto Trait Implementations§
impl<S> !Freeze for BrotliEncoder<S>
impl<S> RefUnwindSafe for BrotliEncoder<S>where
S: RefUnwindSafe,
impl<S> Send for BrotliEncoder<S>where
S: Send,
impl<S> Sync for BrotliEncoder<S>where
S: Sync,
impl<S> UnsafeUnpin for BrotliEncoder<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for BrotliEncoder<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<St> StreamExt for St
impl<St> StreamExt for St
Source§fn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
fn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
None if the
stream is finished. Read moreSource§fn try_next<T, E>(&mut self) -> TryNext<'_, Self>
fn try_next<T, E>(&mut self) -> TryNext<'_, Self>
Source§fn map<T, F>(self, f: F) -> Map<Self, F>
fn map<T, F>(self, f: F) -> Map<Self, F>
Source§fn merge<U>(self, other: U) -> Merge<Self, U>
fn merge<U>(self, other: U) -> Merge<Self, U>
Source§fn filter<F>(self, f: F) -> Filter<Self, F>
fn filter<F>(self, f: F) -> Filter<Self, F>
Source§fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
Source§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
None. Read moreSource§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
n items of the underlying stream. Read moreSource§fn take_while<F>(self, f: F) -> TakeWhile<Self, F>
fn take_while<F>(self, f: F) -> TakeWhile<Self, F>
true. Read moreSource§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
n first items of the
underlying stream. Read moreSource§fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>
true. Read moreSource§fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F>
fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F>
Source§fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F>
fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F>
Source§fn chain<U>(self, other: U) -> Chain<Self, U>
fn chain<U>(self, other: U) -> Chain<Self, U>
Source§impl<St> StreamExt for St
impl<St> StreamExt for St
Source§fn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
fn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
None if the
stream is finished. Read moreSource§fn try_next<T, E>(&mut self) -> TryNext<'_, Self>
fn try_next<T, E>(&mut self) -> TryNext<'_, Self>
Source§fn map<T, F>(self, f: F) -> Map<Self, F>
fn map<T, F>(self, f: F) -> Map<Self, F>
Source§fn merge<U>(self, other: U) -> Merge<Self, U>
fn merge<U>(self, other: U) -> Merge<Self, U>
Source§fn filter<F>(self, f: F) -> Filter<Self, F>
fn filter<F>(self, f: F) -> Filter<Self, F>
Source§fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
Source§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
None. Read moreSource§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
n items of the underlying stream. Read moreSource§fn take_while<F>(self, f: F) -> TakeWhile<Self, F>
fn take_while<F>(self, f: F) -> TakeWhile<Self, F>
true. Read moreSource§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
n first items of the
underlying stream. Read moreSource§fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>
true. Read more