Struct diny::Serialize [−][src]
pub struct Serialize<F, W, D> where
F: FormatEncode,
D: Encodable, { /* fields omitted */ }
Expand description
Implements the Sink trait
Implementations
Instantiates a new (Serializer) for the data type D
from the given format
and writer
Returns true
if the sink is ready to send another item, false
if not
Consumes the sink and attempts to return the underlying decoding format
and writer
.
If the stream is not in the Ready
state, the underlying writer will be consumed, and
the underlying format
will be returned as an error.
Trait Implementations
impl<F, W, D> Sink<D> for Serialize<F, W, D> where
F: FormatEncode,
W: AsyncWrite + Unpin,
D: Encodable,
impl<F, W, D> Sink<D> for Serialize<F, W, D> where
F: FormatEncode,
W: AsyncWrite + Unpin,
D: Encodable,
Auto Trait Implementations
impl<F, W, D> RefUnwindSafe for Serialize<F, W, D> where
D: RefUnwindSafe,
F: RefUnwindSafe,
W: RefUnwindSafe,
<D as Encodable>::Encoder: RefUnwindSafe,
impl<F, W, D> Send for Serialize<F, W, D> where
D: Send,
F: Send,
W: Send,
<D as Encodable>::Encoder: Send,
impl<F, W, D> Sync for Serialize<F, W, D> where
D: Sync,
F: Sync,
W: Sync,
<D as Encodable>::Encoder: Sync,
impl<F, W, D> UnwindSafe for Serialize<F, W, D> where
D: UnwindSafe,
F: UnwindSafe,
W: UnwindSafe,
<D as Encodable>::Encoder: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T, Item> SinkExt<Item> for T where
T: Sink<Item> + ?Sized,
impl<T, Item> SinkExt<Item> for T where
T: Sink<Item> + ?Sized,
Composes a function in front of the sink. Read more
fn with_flat_map<U, St, F>(self, f: F) -> WithFlatMap<Self, Item, U, St, F> where
F: FnMut(U) -> St,
St: Stream<Item = Result<Item, Self::Error>>,
fn with_flat_map<U, St, F>(self, f: F) -> WithFlatMap<Self, Item, U, St, F> where
F: FnMut(U) -> St,
St: Stream<Item = Result<Item, Self::Error>>,
Composes a function in front of the sink. Read more
fn sink_map_err<E, F>(self, f: F) -> SinkMapErr<Self, F> where
F: FnOnce(Self::Error) -> E,
fn sink_map_err<E, F>(self, f: F) -> SinkMapErr<Self, F> where
F: FnOnce(Self::Error) -> E,
Transforms the error returned by the sink.
fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E> where
Self::Error: Into<E>,
fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E> where
Self::Error: Into<E>,
Map this sink’s error to a different error type using the Into
trait. Read more
alloc
only.Adds a fixed-size buffer to the current sink. Read more
Fanout items to multiple sinks. Read more
Flush the sink, processing all pending items. Read more
A future that completes after the given item has been fully processed into the sink, including flushing. Read more
A future that completes after the given item has been received by the sink. Read more
A future that completes after the given stream has been fully processed into the sink, including flushing. Read more
fn left_sink<Si2>(self) -> Either<Self, Si2> where
Si2: Sink<Item, Error = Self::Error>,
fn left_sink<Si2>(self) -> Either<Self, Si2> where
Si2: Sink<Item, Error = Self::Error>,
Wrap this sink in an Either
sink, making it the left-hand variant
of that Either
. Read more
fn right_sink<Si1>(self) -> Either<Si1, Self> where
Si1: Sink<Item, Error = Self::Error>,
fn right_sink<Si1>(self) -> Either<Si1, Self> where
Si1: Sink<Item, Error = Self::Error>,
Wrap this stream in an Either
stream, making it the right-hand variant
of that Either
. Read more