Skip to main content

VectorCodec

Trait VectorCodec 

Source
pub trait VectorCodec {
    type EncodedBlock;
    type Error;

    // Required methods
    fn encode_block(
        &self,
        input: &[f32],
    ) -> Result<Self::EncodedBlock, Self::Error>;
    fn decode_block(
        &self,
        block: &Self::EncodedBlock,
        out: &mut [f32],
    ) -> Result<(), Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn encode_block(&self, input: &[f32]) -> Result<Self::EncodedBlock, Self::Error>

Source

fn decode_block( &self, block: &Self::EncodedBlock, out: &mut [f32], ) -> Result<(), Self::Error>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§