pub trait RecordsSerializerImpl<'a> {
type Record;
// Required methods
fn record_length(record: &Self::Record) -> usize;
fn serialize(data: &mut [u8], record: &Self::Record);
}
Expand description
An implementation of a records serializer.
RecordsSerializerImpl
provides functions to serialize sequential records.
It is required in order to construct a RecordsSerializer
.
Required Associated Types§
Sourcetype Record
type Record
The input type to this serializer.
This is the analogous serializing version of Record
in
RecordsImpl
. Records serialization expects an Iterator
of objects
of type Record
.
Required Methods§
Sourcefn record_length(record: &Self::Record) -> usize
fn record_length(record: &Self::Record) -> usize
Provides the serialized length of a record.
Returns the total length, in bytes, of record
.
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.