Struct async_compression::stream::ZstdEncoder
source · [−]pub struct ZstdEncoder<S> { /* private fields */ }
async-compression::stream
docs for migrationstream
and zstd
only.Expand description
A zstd 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
sourceimpl<S: Stream<Item = Result<Bytes>>> ZstdEncoder<S>
impl<S: Stream<Item = Result<Bytes>>> ZstdEncoder<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
async-compression::stream
docs for migrationCreates 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
async-compression::stream
docs for migrationCreates 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
async-compression::stream
docs for migrationAcquires 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
async-compression::stream
docs for migrationAcquires 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>
async-compression::stream
docs for migrationAcquires 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
async-compression::stream
docs for migrationConsumes 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
sourceimpl<S: Debug> Debug for ZstdEncoder<S>
impl<S: Debug> Debug for ZstdEncoder<S>
sourceimpl<S: Stream<Item = Result<Bytes>>> Stream for ZstdEncoder<S>
impl<S: Stream<Item = Result<Bytes>>> Stream for ZstdEncoder<S>
impl<'__pin, S> Unpin for ZstdEncoder<S>where
__Origin<'__pin, S>: Unpin,
Auto Trait Implementations
impl<S> RefUnwindSafe for ZstdEncoder<S>where
S: RefUnwindSafe,
impl<S> Send for ZstdEncoder<S>where
S: Send,
impl<S> Sync for ZstdEncoder<S>where
S: Sync,
impl<S> UnwindSafe for ZstdEncoder<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