pub enum SvcParamKey {
Mandatory,
Alpn,
NoDefaultAlpn,
Port,
Ipv4Hint,
Ech,
Ipv6Hint,
DohPath,
Int(u16),
}
Variants§
Mandatory
Alpn
NoDefaultAlpn
Port
Ipv4Hint
Ech
Ipv6Hint
DohPath
Int(u16)
A raw value given through its integer.
Implementations§
source§impl SvcParamKey
impl SvcParamKey
sourcepub fn from_mnemonic(m: &[u8]) -> Option<Self>
pub fn from_mnemonic(m: &[u8]) -> Option<Self>
Returns a value from a well-defined mnemonic.
sourcepub const fn to_mnemonic(self) -> Option<&'static [u8]>
pub const fn to_mnemonic(self) -> Option<&'static [u8]>
Returns the mnemonic for this value if there is one.
This will also return a mnemonic if a well-defined variant
is hidden in a Int
variant.
pub fn parse<'a, Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'a, Octs> ) -> Result<Self, ParseError>
pub const COMPOSE_LEN: u16 = 2u16
pub fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target ) -> Result<(), Target::AppendError>
Trait Implementations§
source§impl Clone for SvcParamKey
impl Clone for SvcParamKey
source§fn clone(&self) -> SvcParamKey
fn clone(&self) -> SvcParamKey
Returns a copy 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 Debug for SvcParamKey
impl Debug for SvcParamKey
source§impl Display for SvcParamKey
impl Display for SvcParamKey
source§impl<'a> From<&'a SvcParamKey> for u16
impl<'a> From<&'a SvcParamKey> for u16
source§fn from(value: &'a SvcParamKey) -> Self
fn from(value: &'a SvcParamKey) -> Self
Converts to this type from the input type.
source§impl From<SvcParamKey> for u16
impl From<SvcParamKey> for u16
source§fn from(value: SvcParamKey) -> Self
fn from(value: SvcParamKey) -> Self
Converts to this type from the input type.
source§impl From<u16> for SvcParamKey
impl From<u16> for SvcParamKey
source§impl Hash for SvcParamKey
impl Hash for SvcParamKey
source§impl Ord for SvcParamKey
impl Ord for SvcParamKey
source§impl PartialEq<SvcParamKey> for SvcParamKey
impl PartialEq<SvcParamKey> for SvcParamKey
source§impl PartialEq<SvcParamKey> for u16
impl PartialEq<SvcParamKey> for u16
source§fn eq(&self, other: &SvcParamKey) -> bool
fn eq(&self, other: &SvcParamKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<u16> for SvcParamKey
impl PartialEq<u16> for SvcParamKey
source§impl PartialOrd<SvcParamKey> for SvcParamKey
impl PartialOrd<SvcParamKey> for SvcParamKey
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<SvcParamKey> for u16
impl PartialOrd<SvcParamKey> for u16
source§fn partial_cmp(&self, other: &SvcParamKey) -> Option<Ordering>
fn partial_cmp(&self, other: &SvcParamKey) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<u16> for SvcParamKey
impl PartialOrd<u16> for SvcParamKey
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for SvcParamKey
impl Eq for SvcParamKey
Auto Trait Implementations§
impl RefUnwindSafe for SvcParamKey
impl Send for SvcParamKey
impl Sync for SvcParamKey
impl Unpin for SvcParamKey
impl UnwindSafe for SvcParamKey
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<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
fn octets_into(self) -> Targetwhere Self::Error: Into<Infallible>,
Performs an infallible conversion.