pub struct LimitedRecordsImplBridge<O>(/* private fields */);
Expand description
Create a bridge to RecordsImplLayout
and RecordsImpl
from an O
that
implements LimitedRecordsImplLayout
. This is required so we can have a single
implementation of parse_with_context
and definition of Context
that
all implementers of LimitedRecordsImpl
will get for free.
Trait Implementations§
Source§impl<O: Debug> Debug for LimitedRecordsImplBridge<O>
impl<O: Debug> Debug for LimitedRecordsImplBridge<O>
Source§impl<'a, O> RecordsImpl<'a> for LimitedRecordsImplBridge<O>where
O: LimitedRecordsImpl<'a>,
impl<'a, O> RecordsImpl<'a> for LimitedRecordsImplBridge<O>where
O: LimitedRecordsImpl<'a>,
Source§fn parse_with_context<BV: BufferView<&'a [u8]>>(
bytes: &mut BV,
context: &mut Self::Context,
) -> Result<Option<Option<Self::Record>>, Self::Error>
fn parse_with_context<BV: BufferView<&'a [u8]>>( bytes: &mut BV, context: &mut Self::Context, ) -> Result<Option<Option<Self::Record>>, Self::Error>
Parse some bytes with a given context
as a limit.
parse_with_context
accepts a bytes
buffer and limit context
and verifies that the limit has not been reached and that bytes is not empty.
See EXACT_LIMIT_ERROR
for information about exact limiting. If the limit
has not been reached and bytes
has not been exhausted, LimitedRecordsImpl::parse
will be called to do the actual parsing of a record.
Source§impl<O> RecordsImplLayout for LimitedRecordsImplBridge<O>where
O: LimitedRecordsImplLayout,
impl<O> RecordsImplLayout for LimitedRecordsImplBridge<O>where
O: LimitedRecordsImplLayout,
Auto Trait Implementations§
impl<O> Freeze for LimitedRecordsImplBridge<O>
impl<O> RefUnwindSafe for LimitedRecordsImplBridge<O>where
O: RefUnwindSafe,
impl<O> Send for LimitedRecordsImplBridge<O>where
O: Send,
impl<O> Sync for LimitedRecordsImplBridge<O>where
O: Sync,
impl<O> Unpin for LimitedRecordsImplBridge<O>where
O: Unpin,
impl<O> UnwindSafe for LimitedRecordsImplBridge<O>where
O: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more