pub struct TwoByteElement<'a> {
pub id: TwoByteId,
pub data: &'a [u8],
}Available on crate feature
rfc8285 only.Expand description
A single RFC 8285 two-byte-form extension element (§4.3): a validated
1..=255 local identifier plus 0..=255 bytes of element data (stored
directly, with no -1 length bias — unlike the one-byte form).
Fields§
§id: TwoByteIdThe element’s local identifier.
data: &'a [u8]The element’s data, 0..=255 bytes (§4.3: “The value zero (0)
indicates that there is no subsequent data”).
Trait Implementations§
Source§impl<'a> Clone for TwoByteElement<'a>
impl<'a> Clone for TwoByteElement<'a>
Source§fn clone(&self) -> TwoByteElement<'a>
fn clone(&self) -> TwoByteElement<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for TwoByteElement<'a>
Source§impl<'a> Debug for TwoByteElement<'a>
impl<'a> Debug for TwoByteElement<'a>
impl<'a> Eq for TwoByteElement<'a>
Source§impl<'a> PartialEq for TwoByteElement<'a>
impl<'a> PartialEq for TwoByteElement<'a>
Source§impl<'a> Serialize for TwoByteElement<'a>
Available on crate feature serde only.
impl<'a> Serialize for TwoByteElement<'a>
Available on crate feature
serde only.impl<'a> StructuralPartialEq for TwoByteElement<'a>
Auto Trait Implementations§
impl<'a> Freeze for TwoByteElement<'a>
impl<'a> RefUnwindSafe for TwoByteElement<'a>
impl<'a> Send for TwoByteElement<'a>
impl<'a> Sync for TwoByteElement<'a>
impl<'a> Unpin for TwoByteElement<'a>
impl<'a> UnsafeUnpin for TwoByteElement<'a>
impl<'a> UnwindSafe for TwoByteElement<'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