pub trait EncodeRecord {
// Required methods
fn encode_record<R: DbnEncodable>(&mut self, record: &R) -> Result<()>;
fn flush(&mut self) -> Result<()>;
}Expand description
Trait for types that encode a DBN record of a specific type.
Required Methods§
Sourcefn encode_record<R: DbnEncodable>(&mut self, record: &R) -> Result<()>
fn encode_record<R: DbnEncodable>(&mut self, record: &R) -> Result<()>
Encodes a single DBN record of type R.
§Errors
This function returns an error if it’s unable to write to the underlying writer or there’s a serialization error.
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.