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§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§impl PartialOrd<u16> for SvcParamKey
impl PartialOrd<u16> for SvcParamKey
source§impl PartialOrd for SvcParamKey
impl PartialOrd for SvcParamKey
impl 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.