pub struct PPV2ParserZeroCopy<'zc>(/* private fields */);Expand description
Used with ProxyV2Parser its PAR generic.
A parser which borrows the data from external buffer without copying it. The lifetime is a lifetime of the parser instance.
Trait Implementations§
Source§impl<'zc> Debug for PPV2ParserZeroCopy<'zc>
impl<'zc> Debug for PPV2ParserZeroCopy<'zc>
Source§impl<'zc> Display for PPV2ParserZeroCopy<'zc>
impl<'zc> Display for PPV2ParserZeroCopy<'zc>
Source§impl<'zc> PP2TlvRestore<'zc> for PPV2ParserZeroCopy<'zc>
impl<'zc> PP2TlvRestore<'zc> for PPV2ParserZeroCopy<'zc>
type TlvTblRes = PP2Tlvs<'zc>
Source§fn contains_subtype(item: &Self::TlvTblRes) -> bool
fn contains_subtype(item: &Self::TlvTblRes) -> bool
Should return
true if the current instance contains subtypes.Source§fn is_in_range(tlv_type: u8, tlv_parent_type: Option<u8>) -> bool
fn is_in_range(tlv_type: u8, tlv_parent_type: Option<u8>) -> bool
Checks if the current TLV is in range of the
tlv_parent_type parent. If
tlv_parent_type is None then the tlv_type can be checked against the
main range. The tlv_parent_type is set when the current tlv_type is a
subset of the parent. Read moreSource§fn restore(
tlv_type: u8,
cur: &mut Cursor<&'zc [u8]>,
) -> HaProxRes<Self::TlvTblRes>
fn restore( tlv_type: u8, cur: &mut Cursor<&'zc [u8]>, ) -> HaProxRes<Self::TlvTblRes>
A function which is called when the parsing reaches the TLV’s payload. The cursor
is poiniting to the beginning of the payload and the inner buffer is a slice
from the main buffer of size of the TLV’s payload. Read more
Auto Trait Implementations§
impl<'zc> Freeze for PPV2ParserZeroCopy<'zc>
impl<'zc> RefUnwindSafe for PPV2ParserZeroCopy<'zc>
impl<'zc> Send for PPV2ParserZeroCopy<'zc>
impl<'zc> Sync for PPV2ParserZeroCopy<'zc>
impl<'zc> Unpin for PPV2ParserZeroCopy<'zc>
impl<'zc> UnwindSafe for PPV2ParserZeroCopy<'zc>
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