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.
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