#[non_exhaustive]pub enum OptionalHType {
ExtPadding,
TimeStamp,
Other(u8),
}Expand description
Typed H-Type for an Optional extension header (H-LEN = 1..=5, RFC 4326 §5).
Optional H-Types share the H-Type byte namespace with Mandatory H-Types
but are distinguished by a non-zero H-LEN.
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.
ExtPadding
Extension-Padding — H-Type 0x00, H-LEN 1..=5 (RFC 4326 §5.3).
TimeStamp
TimeStamp — H-Type 0x01, H-LEN = 3 (RFC 5163 §3.3).
Other(u8)
An unrecognised optional H-Type.
Implementations§
Trait Implementations§
Source§impl Clone for OptionalHType
impl Clone for OptionalHType
Source§fn clone(&self) -> OptionalHType
fn clone(&self) -> OptionalHType
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 Copy for OptionalHType
Source§impl Debug for OptionalHType
impl Debug for OptionalHType
Source§impl Display for OptionalHType
impl Display for OptionalHType
impl Eq for OptionalHType
Source§impl Hash for OptionalHType
impl Hash for OptionalHType
Source§impl PartialEq for OptionalHType
impl PartialEq for OptionalHType
Source§fn eq(&self, other: &OptionalHType) -> bool
fn eq(&self, other: &OptionalHType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for OptionalHType
impl Serialize for OptionalHType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for OptionalHType
Auto Trait Implementations§
impl Freeze for OptionalHType
impl RefUnwindSafe for OptionalHType
impl Send for OptionalHType
impl Sync for OptionalHType
impl Unpin for OptionalHType
impl UnsafeUnpin for OptionalHType
impl UnwindSafe for OptionalHType
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