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§
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 Methods§
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.