pub struct XzDecoder<S> { /* private fields */ }See async-compression::stream docs for migration
stream and xz only.Expand description
A xz 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§
Source§impl<S: Stream<Item = Result<Bytes>>> XzDecoder<S>
impl<S: Stream<Item = Result<Bytes>>> XzDecoder<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
See async-compression::stream docs for migration
Creates 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)
See async-compression::stream docs for migration
Configure 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
See async-compression::stream docs for migration
Acquires 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
See async-compression::stream docs for migration
Acquires 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>
See async-compression::stream docs for migration
Acquires 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
See async-compression::stream docs for migration
Consumes 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§
Source§impl<S: Stream<Item = Result<Bytes>>> Stream for XzDecoder<S>
impl<S: Stream<Item = Result<Bytes>>> Stream for XzDecoder<S>
impl<'__pin, S> Unpin for XzDecoder<S>where
PinnedFieldsOf<__Origin<'__pin, S>>: Unpin,
Auto Trait Implementations§
impl<S> !Freeze for XzDecoder<S>
impl<S> RefUnwindSafe for XzDecoder<S>where
S: RefUnwindSafe,
impl<S> Send for XzDecoder<S>where
S: Send,
impl<S> Sync for XzDecoder<S>where
S: Sync,
impl<S> UnsafeUnpin for XzDecoder<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for XzDecoder<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