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.

Object Safety§

This trait is not object safe.

Implementors§