Struct bytecodec::combinator::WithPrefix
[−]
[src]
pub struct WithPrefix<E0, E1, F> { /* fields omitted */ }
Combinator for adding prefix items.
This is created by calling EncodeExt::with_prefix
method.
Trait Implementations
impl<E0: Debug, E1: Debug, F: Debug> Debug for WithPrefix<E0, E1, F>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<E0, E1, F> Encode for WithPrefix<E0, E1, F> where
E0: Encode,
E1: Encode,
F: Fn(&E0) -> E1::Item,
[src]
E0: Encode,
E1: Encode,
F: Fn(&E0) -> E1::Item,
type Item = E0::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, item: 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, F> ExactBytesEncode for WithPrefix<E0, E1, F> where
E0: ExactBytesEncode,
E1: ExactBytesEncode,
F: Fn(&E0) -> E1::Item,
[src]
E0: ExactBytesEncode,
E1: ExactBytesEncode,
F: Fn(&E0) -> E1::Item,
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, F> Send for WithPrefix<E0, E1, F> where
E0: Send,
E1: Send,
F: Send,
E0: Send,
E1: Send,
F: Send,
impl<E0, E1, F> Sync for WithPrefix<E0, E1, F> where
E0: Sync,
E1: Sync,
F: Sync,
E0: Sync,
E1: Sync,
F: Sync,