pub struct ParserFrame<'a> { /* private fields */ }Expand description
One exactly framed borrowed parser payload.
Implementations§
Source§impl<'a> ParserFrame<'a>
impl<'a> ParserFrame<'a>
Sourcepub fn decode_exact(bytes: &'a [u8]) -> Result<Self, ParserProtocolError>
pub fn decode_exact(bytes: &'a [u8]) -> Result<Self, ParserProtocolError>
Decode exactly one complete frame without allocating its payload.
Header validation, including the declared bound, occurs before the declared length is used to address the payload.
§Errors
Returns an error for an invalid header, truncation, or trailing bytes.
Sourcepub const fn kind(self) -> ParserFrameKind
pub const fn kind(self) -> ParserFrameKind
Return the validated closed frame kind.
Trait Implementations§
Source§impl<'a> Clone for ParserFrame<'a>
impl<'a> Clone for ParserFrame<'a>
Source§fn clone(&self) -> ParserFrame<'a>
fn clone(&self) -> ParserFrame<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ParserFrame<'a>
impl<'a> Debug for ParserFrame<'a>
Source§impl<'a> PartialEq for ParserFrame<'a>
impl<'a> PartialEq for ParserFrame<'a>
impl<'a> Copy for ParserFrame<'a>
impl<'a> Eq for ParserFrame<'a>
impl<'a> StructuralPartialEq for ParserFrame<'a>
Auto Trait Implementations§
impl<'a> Freeze for ParserFrame<'a>
impl<'a> RefUnwindSafe for ParserFrame<'a>
impl<'a> Send for ParserFrame<'a>
impl<'a> Sync for ParserFrame<'a>
impl<'a> Unpin for ParserFrame<'a>
impl<'a> UnwindSafe for ParserFrame<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.