Encoder

Trait Encoder 

Source
pub trait Encoder {
    type EncodeOutput;
    type RecordOutput;

    // Required methods
    fn encode_multiple(
        &mut self,
        paths: &[PathBuf],
        parallel: bool,
    ) -> Self::EncodeOutput;
    fn encode<P: AsRef<Path>>(&mut self, path: P) -> Self::EncodeOutput;
    fn encode_record(&self, id: &[u8], seq: &[u8]) -> Self::RecordOutput;

    // Provided method
    fn fetch_records<P: AsRef<Path>>(
        &mut self,
        path: P,
    ) -> Result<Vec<RecordData>> { ... }
}

Required Associated Types§

Required Methods§

Source

fn encode_multiple( &mut self, paths: &[PathBuf], parallel: bool, ) -> Self::EncodeOutput

Source

fn encode<P: AsRef<Path>>(&mut self, path: P) -> Self::EncodeOutput

Source

fn encode_record(&self, id: &[u8], seq: &[u8]) -> Self::RecordOutput

Provided Methods§

Source

fn fetch_records<P: AsRef<Path>>(&mut self, path: P) -> Result<Vec<RecordData>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§