Trait ppp_packet::records::LimitedRecordsImpl
source · pub trait LimitedRecordsImpl<'a>: LimitedRecordsImplLayout {
type Record;
// Required method
fn parse<BV: BufferView<&'a [u8]>>(
bytes: &mut BV,
) -> Result<Option<Option<Self::Record>>, Self::Error>;
}
Required Associated Types§
sourcetype Record
type Record
See RecordsImpl::Record
as this will be bound to a RecordsImpl::Record
associated type directly.
Required Methods§
sourcefn parse<BV: BufferView<&'a [u8]>>(
bytes: &mut BV,
) -> Result<Option<Option<Self::Record>>, Self::Error>
fn parse<BV: BufferView<&'a [u8]>>( bytes: &mut BV, ) -> Result<Option<Option<Self::Record>>, Self::Error>
Parse a record after limit check has completed.
parse
will be called by a LimitedRecordsImpl::parse_with_context
after
doing limit checks. When this method is called, it is guaranteed by
LimitedRecordsImpl::parse_with_context
that the limit has not been reached,
so parse
should parse exactly one record (if possible).
For information about return values, see RecordsImpl::parse_with_context
.
Object Safety§
This trait is not object safe.