Struct async_codec_util::encoder::Chain
[−]
[src]
pub struct Chain<W, S, T> { /* fields omitted */ }
Wraps two AsyncEncode
s and encodes them in sequence.
Methods
impl<W, S, T> Chain<W, S, T>
[src]
pub fn new(first: S, second: T) -> Chain<W, S, T>
[src]
Create new Chain
which first encodes the given S
and then encodes the given T
.
Trait Implementations
impl<W, S, T> AsyncEncode<W> for Chain<W, S, T> where
W: AsyncWrite,
S: AsyncEncode<W>,
T: AsyncEncode<W>,
[src]
W: AsyncWrite,
S: AsyncEncode<W>,
T: AsyncEncode<W>,
fn poll_encode(
&mut self,
cx: &mut Context,
writer: &mut W
) -> Poll<usize, FutIoErr>
[src]
&mut self,
cx: &mut Context,
writer: &mut W
) -> Poll<usize, FutIoErr>
Call writer.poll_write
once with encoded data, propagating any Err
and Pending
, and returning how many bytes were written. Read more
impl<W, S, T> AsyncEncodeLen<W> for Chain<W, S, T> where
W: AsyncWrite,
S: AsyncEncodeLen<W>,
T: AsyncEncodeLen<W>,
[src]
W: AsyncWrite,
S: AsyncEncodeLen<W>,
T: AsyncEncodeLen<W>,
fn remaining_bytes(&self) -> usize
[src]
Return the exact number of bytes this will still write. Read more