Trait irox_tools::codec::Codec

source ·
pub trait Codec {
    // Required methods
    fn encode<I: Bits, O: MutBits>(
        &self,
        input: I,
        output: &mut O
    ) -> Result<usize, Error>;
    fn decode<I: Bits, O: MutBits>(
        &self,
        input: I,
        output: &mut O
    ) -> Result<usize, Error>;
}
Expand description

Something that can encode or decode bytes to bytes

Required Methods§

source

fn encode<I: Bits, O: MutBits>( &self, input: I, output: &mut O ) -> Result<usize, Error>

Encodes the input, writing to output. Returns the total number of bytes written.

source

fn decode<I: Bits, O: MutBits>( &self, input: I, output: &mut O ) -> Result<usize, Error>

Decodes the input, writing to output. Returns the total number of bytes written.

Object Safety§

This trait is not object safe.

Implementors§