Struct async_compression::stream::BrotliDecoder
source · [−]pub struct BrotliDecoder<S> { /* private fields */ }
async-compression::stream
docs for migrationstream
and brotli
only.Expand description
A brotli decoder, or decompressor.
This structure implements a Stream
interface and will read
compressed data from an underlying stream and emit a stream of uncompressed data.
Implementations
sourceimpl<S: Stream<Item = Result<Bytes>>> BrotliDecoder<S>
impl<S: Stream<Item = Result<Bytes>>> BrotliDecoder<S>
sourcepub fn new(stream: S) -> Self
👎Deprecated since 0.3.8: See async-compression::stream
docs for migration
pub fn new(stream: S) -> Self
async-compression::stream
docs for migrationCreates a new decoder which will read compressed data from the given stream and emit an uncompressed stream.
sourcepub fn multiple_members(&mut self, enabled: bool)
👎Deprecated since 0.3.8: See async-compression::stream
docs for migration
pub fn multiple_members(&mut self, enabled: bool)
async-compression::stream
docs for migrationConfigure multi-member/frame decoding, if enabled this will reset the decoder state when reaching the end of a compressed member/frame and expect either the end of the wrapped stream or another compressed member/frame to follow.
sourcepub fn get_ref(&self) -> &S
👎Deprecated since 0.3.8: See async-compression::stream
docs for migration
pub fn get_ref(&self) -> &S
async-compression::stream
docs for migrationAcquires a reference to the underlying stream that this decoder 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
async-compression::stream
docs for migrationAcquires a mutable reference to the underlying stream that this decoder is wrapping.
Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this decoder.
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>
async-compression::stream
docs for migrationAcquires a pinned mutable reference to the underlying stream that this decoder is wrapping.
Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this decoder.
sourcepub fn into_inner(self) -> S
👎Deprecated since 0.3.8: See async-compression::stream
docs for migration
pub fn into_inner(self) -> S
async-compression::stream
docs for migrationConsumes this decoder returning the underlying stream.
Note that this may discard internal state of this decoder, so care should be taken to avoid losing resources when this is called.
Trait Implementations
sourceimpl<S: Debug> Debug for BrotliDecoder<S>
impl<S: Debug> Debug for BrotliDecoder<S>
sourceimpl<S: Stream<Item = Result<Bytes>>> Stream for BrotliDecoder<S>
impl<S: Stream<Item = Result<Bytes>>> Stream for BrotliDecoder<S>
impl<'__pin, S> Unpin for BrotliDecoder<S>where
__Origin<'__pin, S>: Unpin,
Auto Trait Implementations
impl<S> RefUnwindSafe for BrotliDecoder<S>where
S: RefUnwindSafe,
impl<S> Send for BrotliDecoder<S>where
S: Send,
impl<S> Sync for BrotliDecoder<S>where
S: Sync,
impl<S> UnwindSafe for BrotliDecoder<S>where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<St> StreamExt for Stwhere
St: Stream + ?Sized,
impl<St> StreamExt for Stwhere
St: Stream + ?Sized,
sourcefn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
fn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
None
if the
stream is finished. Read moresourcefn try_next<T, E>(&mut self) -> TryNext<'_, Self>where
Self: Stream<Item = Result<T, E>> + Unpin,
fn try_next<T, E>(&mut self) -> TryNext<'_, Self>where
Self: Stream<Item = Result<T, E>> + Unpin,
sourcefn map<T, F>(self, f: F) -> Map<Self, F>where
F: FnMut(Self::Item) -> T,
fn map<T, F>(self, f: F) -> Map<Self, F>where
F: FnMut(Self::Item) -> T,
sourcefn merge<U>(self, other: U) -> Merge<Self, U>where
U: Stream<Item = Self::Item>,
fn merge<U>(self, other: U) -> Merge<Self, U>where
U: Stream<Item = Self::Item>,
sourcefn filter<F>(self, f: F) -> Filter<Self, F>where
F: FnMut(&Self::Item) -> bool,
fn filter<F>(self, f: F) -> Filter<Self, F>where
F: FnMut(&Self::Item) -> bool,
sourcefn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>where
F: FnMut(Self::Item) -> Option<T>,
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>where
F: FnMut(Self::Item) -> Option<T>,
sourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
n
items of the underlying stream. Read moresourcefn take_while<F>(self, f: F) -> TakeWhile<Self, F>where
F: FnMut(&Self::Item) -> bool,
fn take_while<F>(self, f: F) -> TakeWhile<Self, F>where
F: FnMut(&Self::Item) -> bool,
true
. Read moresourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
n
first items of the
underlying stream. Read moresourcefn skip_while<F>(self, f: F) -> SkipWhile<Self, F>where
F: FnMut(&Self::Item) -> bool,
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>where
F: FnMut(&Self::Item) -> bool,
true
. Read moresourcefn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F>where
Self: Unpin,
F: FnMut(Self::Item) -> bool,
fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F>where
Self: Unpin,
F: FnMut(Self::Item) -> bool,
sourcefn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F>where
Self: Unpin,
F: FnMut(Self::Item) -> bool,
fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F>where
Self: Unpin,
F: FnMut(Self::Item) -> bool,
sourcefn chain<U>(self, other: U) -> Chain<Self, U>where
U: Stream<Item = Self::Item>,
fn chain<U>(self, other: U) -> Chain<Self, U>where
U: Stream<Item = Self::Item>,
sourcefn fold<B, F>(self, init: B, f: F) -> FoldFuture<Self, B, F>where
F: FnMut(B, Self::Item) -> B,
fn fold<B, F>(self, init: B, f: F) -> FoldFuture<Self, B, F>where
F: FnMut(B, Self::Item) -> B,
sourcefn collect<T>(self) -> Collect<Self, T>where
T: FromStream<Self::Item>,
fn collect<T>(self) -> Collect<Self, T>where
T: FromStream<Self::Item>,
sourceimpl<St> StreamExt for Stwhere
St: Stream + ?Sized,
impl<St> StreamExt for Stwhere
St: Stream + ?Sized,
sourcefn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
fn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
None
if the
stream is finished. Read moresourcefn try_next<T, E>(&mut self) -> TryNext<'_, Self>where
Self: Stream<Item = Result<T, E>> + Unpin,
fn try_next<T, E>(&mut self) -> TryNext<'_, Self>where
Self: Stream<Item = Result<T, E>> + Unpin,
sourcefn map<T, F>(self, f: F) -> Map<Self, F>where
F: FnMut(Self::Item) -> T,
fn map<T, F>(self, f: F) -> Map<Self, F>where
F: FnMut(Self::Item) -> T,
sourcefn merge<U>(self, other: U) -> Merge<Self, U>where
U: Stream<Item = Self::Item>,
fn merge<U>(self, other: U) -> Merge<Self, U>where
U: Stream<Item = Self::Item>,
sourcefn filter<F>(self, f: F) -> Filter<Self, F>where
F: FnMut(&Self::Item) -> bool,
fn filter<F>(self, f: F) -> Filter<Self, F>where
F: FnMut(&Self::Item) -> bool,
sourcefn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>where
F: FnMut(Self::Item) -> Option<T>,
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>where
F: FnMut(Self::Item) -> Option<T>,
sourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
n
items of the underlying stream. Read moresourcefn take_while<F>(self, f: F) -> TakeWhile<Self, F>where
F: FnMut(&Self::Item) -> bool,
fn take_while<F>(self, f: F) -> TakeWhile<Self, F>where
F: FnMut(&Self::Item) -> bool,
true
. Read moresourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
n
first items of the
underlying stream. Read moresourcefn skip_while<F>(self, f: F) -> SkipWhile<Self, F>where
F: FnMut(&Self::Item) -> bool,
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>where
F: FnMut(&Self::Item) -> bool,
true
. Read more