Struct AnyExtension
pub struct AnyExtension(pub u8);
A newtype wrapper around an arbitrary extension ID.
An extension is some amount of byte data organized in sub-blocks so that one can skip over it
without knowing the semantics. Though technically you likely want to use a Application
extension, the library tries to stay flexible here.
This allows us to customize the set of impls compared to a raw u8. It also clarifies the
intent and gives some inherent methods for interoperability with known extension types.
Fields
0: u8
Implementations
impl AnyExtension
const fn into_known(self) -> Option<Extension>Decode the label as a known extension.
Trait Implementations
impl Clone for AnyExtension
fn clone(&self) -> Self
impl Copy for AnyExtension
impl Debug for AnyExtension
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for AnyExtension
impl From<Extension> for AnyExtension
fn from(ext: Extension) -> Self
impl Hash for AnyExtension
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for AnyExtension
fn eq(&self, other: &Self) -> bool