ppp_packet::records

Trait 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§

Source

type Record

See RecordsImpl::Record as this will be bound to a RecordsImpl::Record associated type directly.

Required Methods§

Source

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.

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.

Implementors§