#[non_exhaustive]pub enum ExtensionElements<'a> {
OneByte(OneByteElements<'a>),
TwoByte(TwoByteElements<'a>),
}Available on crate feature
rfc8285 only.Expand description
The result of dispatching a HeaderExtension to its RFC 8285 form by
profile_id (see parse_extensions). A data-carrying dispatch wrapper
(in the same spirit as this workspace’s AnyTableSection/AnyDescriptor
dispatch enums) — not a spec/field label, so it is exempt from the #204
name()/Display convention (see tests/label_coverage.rs’s SKIP list).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
OneByte(OneByteElements<'a>)
§4.2 one-byte-form elements (profile_id == 0xBEDE).
TwoByte(TwoByteElements<'a>)
§4.3 two-byte-form elements (profile_id & 0xFFF0 == 0x1000).
Trait Implementations§
Source§impl<'a> Clone for ExtensionElements<'a>
impl<'a> Clone for ExtensionElements<'a>
Source§fn clone(&self) -> ExtensionElements<'a>
fn clone(&self) -> ExtensionElements<'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 moreSource§impl<'a> Debug for ExtensionElements<'a>
impl<'a> Debug for ExtensionElements<'a>
impl<'a> Eq for ExtensionElements<'a>
Source§impl<'a> PartialEq for ExtensionElements<'a>
impl<'a> PartialEq for ExtensionElements<'a>
Source§impl<'a> Serialize for ExtensionElements<'a>
impl<'a> Serialize for ExtensionElements<'a>
Source§impl Serialize for ExtensionElements<'_>
impl Serialize for ExtensionElements<'_>
Source§type Error = Error
type Error = Error
The error type this implementer returns (usually the same as the
corresponding
Parse impl, but need not be).Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Number of bytes
serialize_into will write.impl<'a> StructuralPartialEq for ExtensionElements<'a>
Auto Trait Implementations§
impl<'a> Freeze for ExtensionElements<'a>
impl<'a> RefUnwindSafe for ExtensionElements<'a>
impl<'a> Send for ExtensionElements<'a>
impl<'a> Sync for ExtensionElements<'a>
impl<'a> Unpin for ExtensionElements<'a>
impl<'a> UnsafeUnpin for ExtensionElements<'a>
impl<'a> UnwindSafe for ExtensionElements<'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