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