Struct bytecodec::combinator::EncoderChain
[−]
[src]
pub struct EncoderChain<E0, E1, T> { /* fields omitted */ }
Combinator for connecting encoders to a chain.
This is created by calling StartEncoderChain::chain
or EncodeExt::chain
methods.
Trait Implementations
impl<E0: Debug, E1: Debug, T: Debug> Debug for EncoderChain<E0, E1, T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<E> Encode for EncoderChain<StartEncoderChain, E, ()> where
E: Encode,
[src]
E: Encode,
type Item = (E::Item,)
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
[src]
Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more
fn start_encoding(&mut self, t: Self::Item) -> Result<()>
[src]
Tries to start encoding the given item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the number of bytes required to encode all the items in the encoder. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be encoded in the encoder, otherwise false
.
impl<E0, E1, T0> Encode for EncoderChain<E0, E1, (T0,)> where
E0: Encode<Item = (T0,)>,
E1: Encode,
[src]
E0: Encode<Item = (T0,)>,
E1: Encode,
type Item = (T0, E1::Item)
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
[src]
Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more
fn start_encoding(&mut self, t: Self::Item) -> Result<()>
[src]
Tries to start encoding the given item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the number of bytes required to encode all the items in the encoder. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be encoded in the encoder, otherwise false
.
impl<E0, E1, T0, T1> Encode for EncoderChain<E0, E1, (T0, T1)> where
E0: Encode<Item = (T0, T1)>,
E1: Encode,
[src]
E0: Encode<Item = (T0, T1)>,
E1: Encode,
type Item = (T0, T1, E1::Item)
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
[src]
Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more
fn start_encoding(&mut self, t: Self::Item) -> Result<()>
[src]
Tries to start encoding the given item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the number of bytes required to encode all the items in the encoder. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be encoded in the encoder, otherwise false
.
impl<E0, E1, T0, T1, T2> Encode for EncoderChain<E0, E1, (T0, T1, T2)> where
E0: Encode<Item = (T0, T1, T2)>,
E1: Encode,
[src]
E0: Encode<Item = (T0, T1, T2)>,
E1: Encode,
type Item = (T0, T1, T2, E1::Item)
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
[src]
Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more
fn start_encoding(&mut self, t: Self::Item) -> Result<()>
[src]
Tries to start encoding the given item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the number of bytes required to encode all the items in the encoder. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be encoded in the encoder, otherwise false
.
impl<E0, E1, T0, T1, T2, T3> Encode for EncoderChain<E0, E1, (T0, T1, T2, T3)> where
E0: Encode<Item = (T0, T1, T2, T3)>,
E1: Encode,
[src]
E0: Encode<Item = (T0, T1, T2, T3)>,
E1: Encode,
type Item = (T0, T1, T2, T3, E1::Item)
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
[src]
Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more
fn start_encoding(&mut self, t: Self::Item) -> Result<()>
[src]
Tries to start encoding the given item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the number of bytes required to encode all the items in the encoder. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be encoded in the encoder, otherwise false
.
impl<E0, E1, T0, T1, T2, T3, T4> Encode for EncoderChain<E0, E1, (T0, T1, T2, T3, T4)> where
E0: Encode<Item = (T0, T1, T2, T3, T4)>,
E1: Encode,
[src]
E0: Encode<Item = (T0, T1, T2, T3, T4)>,
E1: Encode,
type Item = (T0, T1, T2, T3, T4, E1::Item)
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
[src]
Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more
fn start_encoding(&mut self, t: Self::Item) -> Result<()>
[src]
Tries to start encoding the given item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the number of bytes required to encode all the items in the encoder. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be encoded in the encoder, otherwise false
.
impl<E0, E1, T0, T1, T2, T3, T4, T5> Encode for EncoderChain<E0, E1, (T0, T1, T2, T3, T4, T5)> where
E0: Encode<Item = (T0, T1, T2, T3, T4, T5)>,
E1: Encode,
[src]
E0: Encode<Item = (T0, T1, T2, T3, T4, T5)>,
E1: Encode,
type Item = (T0, T1, T2, T3, T4, T5, E1::Item)
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
[src]
Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more
fn start_encoding(&mut self, t: Self::Item) -> Result<()>
[src]
Tries to start encoding the given item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the number of bytes required to encode all the items in the encoder. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be encoded in the encoder, otherwise false
.
impl<E0, E1, T0, T1, T2, T3, T4, T5, T6> Encode for EncoderChain<E0, E1, (T0, T1, T2, T3, T4, T5, T6)> where
E0: Encode<Item = (T0, T1, T2, T3, T4, T5, T6)>,
E1: Encode,
[src]
E0: Encode<Item = (T0, T1, T2, T3, T4, T5, T6)>,
E1: Encode,
type Item = (T0, T1, T2, T3, T4, T5, T6, E1::Item)
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
[src]
Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more
fn start_encoding(&mut self, t: Self::Item) -> Result<()>
[src]
Tries to start encoding the given item. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the number of bytes required to encode all the items in the encoder. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be encoded in the encoder, otherwise false
.
impl<E0, E1, T> ExactBytesEncode for EncoderChain<E0, E1, T> where
Self: Encode,
E0: ExactBytesEncode,
E1: ExactBytesEncode,
[src]
Self: Encode,
E0: ExactBytesEncode,
E1: ExactBytesEncode,
fn exact_requiring_bytes(&self) -> u64
[src]
Returns the exact number of bytes required to encode all the items remaining in the encoder.
Auto Trait Implementations
impl<E0, E1, T> Send for EncoderChain<E0, E1, T> where
E0: Send,
E1: Send,
T: Send,
E0: Send,
E1: Send,
T: Send,
impl<E0, E1, T> Sync for EncoderChain<E0, E1, T> where
E0: Sync,
E1: Sync,
T: Sync,
E0: Sync,
E1: Sync,
T: Sync,