pub trait Encoder:
Send
+ Sync
+ 'static {
type Error: Error + Send + Sync + 'static;
const EXT: &'static str;
// Required method
fn encode<R: Serialize + DeserializeOwned>(
&self,
records: &[R],
) -> Result<Vec<u8>, Self::Error>;
}Expand description
Encodes one window of records into the bytes of a single file.
Implementations must succeed on an empty slice (a valid empty file), since callers may hand over drained-but-empty windows.
Required Associated Constants§
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".