Trait bytecodec::ExactBytesEncode [] [src]

pub trait ExactBytesEncode: Encode {
    fn requiring_bytes(&self) -> u64 { ... }
}

This trait indicates that the encoder always known the exact bytes required to encode remaining items.

By implementing this trait, the user of those encoders can implement length-prefixed protocols easily.

Provided Methods

Returns the number of bytes required to encode all the items in the encoder.

Implementations on Foreign Types

impl<E: ?Sized + ExactBytesEncode> ExactBytesEncode for Box<E>
[src]

Implementors