[−][src]Struct async_compression::stream::GzipDecoder
A gzip 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
impl<S: Stream<Item = Result<Bytes>>> GzipDecoder<S>
[src]
pub fn new(stream: S) -> Self
[src]
Creates a new decoder which will read compressed data from the given stream and emit an uncompressed stream.
pub fn multiple_members(&mut self, enabled: bool)
[src]
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.
pub fn get_ref(&self) -> &S
[src]
Acquires a reference to the underlying stream that this decoder is wrapping.
pub fn get_mut(&mut self) -> &mut S
[src]
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.
pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut S>
[src]
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.
pub fn into_inner(self) -> S
[src]
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
impl<S: Debug> Debug for GzipDecoder<S>
[src]
impl<S: Stream<Item = Result<Bytes>>> Stream for GzipDecoder<S>
[src]
type Item = Result<Bytes>
Values yielded by the stream.
fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes>>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes>>>
fn size_hint(&self) -> (usize, Option<usize>)
[src]
impl<'__pin, S> Unpin for GzipDecoder<S> where
__Origin<'__pin, S>: Unpin,
[src]
__Origin<'__pin, S>: Unpin,
Auto Trait Implementations
impl<S> RefUnwindSafe for GzipDecoder<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for GzipDecoder<S> where
S: Send,
S: Send,
impl<S> Sync for GzipDecoder<S> where
S: Sync,
S: Sync,
impl<S> UnwindSafe for GzipDecoder<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T, E> TryStream for S where
S: Stream<Item = Result<T, E>> + ?Sized,
[src]
S: Stream<Item = Result<T, E>> + ?Sized,