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 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 PartialEq for SvcParamKey
impl PartialEq for SvcParamKey
source§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 moresource§impl PartialOrd for SvcParamKey
impl PartialOrd 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 Freeze for SvcParamKey
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) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.