Struct tokio_util::codec::FramedWrite [−][src]
pub struct FramedWrite<T, E> { /* fields omitted */ }
Expand description
A Sink
of frames encoded to an AsyncWrite
.
Implementations
Creates a new FramedWrite
with the given encoder
.
Returns a reference to the underlying I/O stream wrapped by
FramedWrite
.
Note that care should be taken to not tamper with the underlying stream of data coming in as it may corrupt the stream of frames otherwise being worked with.
Returns a mutable reference to the underlying I/O stream wrapped by
FramedWrite
.
Note that care should be taken to not tamper with the underlying stream of data coming in as it may corrupt the stream of frames otherwise being worked with.
Returns a pinned mutable reference to the underlying I/O stream wrapped by
FramedWrite
.
Note that care should be taken to not tamper with the underlying stream of data coming in as it may corrupt the stream of frames otherwise being worked with.
Consumes the FramedWrite
, returning its underlying I/O stream.
Note that care should be taken to not tamper with the underlying stream of data coming in as it may corrupt the stream of frames otherwise being worked with.
Returns a mutable reference to the underlying encoder.
Maps the encoder E
to C
, preserving the write buffer
wrapped by Framed
.
Returns a mutable reference to the underlying encoder.
Returns a reference to the write buffer.
Returns a mutable reference to the write buffer.
Trait Implementations
impl<T, I, E> Sink<I> for FramedWrite<T, E> where
T: AsyncWrite,
E: Encoder<I>,
E::Error: From<Error>,
impl<T, I, E> Sink<I> for FramedWrite<T, E> where
T: AsyncWrite,
E: Encoder<I>,
E::Error: From<Error>,
Attempt to pull out the next value of this stream, registering the
current task for wakeup if the value is not yet available, and returning
None
if the stream is exhausted. Read more
Auto Trait Implementations
impl<T, E> RefUnwindSafe for FramedWrite<T, E> where
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for FramedWrite<T, E> where
E: Send,
T: Send,
impl<T, E> Sync for FramedWrite<T, E> where
E: Sync,
T: Sync,
impl<T, E> UnwindSafe for FramedWrite<T, E> where
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more