Trait ppp_packet::records::RecordsSerializerImpl
source · 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
.
Object Safety§
This trait is not object safe.