pub trait Encodable: Sized {
    fn encode<B: ByteBufMut>(
        &self,
        buf: &mut B,
        version: i16
    ) -> Result<(), EncodeError>; fn compute_size(&self, version: i16) -> Result<usize, EncodeError>; }
Expand description

An encodable message.

Required Methods§

Encode the message into the target buffer.

Compute the total size of the message when encoded.

Implementors§