pub enum SvcbParamKey {
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
sourceimpl SvcbParamKey
impl SvcbParamKey
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.
Trait Implementations
sourceimpl Clone for SvcbParamKey
impl Clone for SvcbParamKey
sourcefn clone(&self) -> SvcbParamKey
fn clone(&self) -> SvcbParamKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Compose for SvcbParamKey
impl Compose for SvcbParamKey
sourcefn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the concrete representation of the value to the target. Read more
sourcefn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the canonical representation of the value to the target. Read more
sourceimpl Debug for SvcbParamKey
impl Debug for SvcbParamKey
sourceimpl Display for SvcbParamKey
impl Display for SvcbParamKey
sourceimpl<'a> From<&'a SvcbParamKey> for u16
impl<'a> From<&'a SvcbParamKey> for u16
sourcefn from(value: &'a SvcbParamKey) -> Self
fn from(value: &'a SvcbParamKey) -> Self
Converts to this type from the input type.
sourceimpl From<SvcbParamKey> for u16
impl From<SvcbParamKey> for u16
sourcefn from(value: SvcbParamKey) -> Self
fn from(value: SvcbParamKey) -> Self
Converts to this type from the input type.
sourceimpl From<u16> for SvcbParamKey
impl From<u16> for SvcbParamKey
sourceimpl Hash for SvcbParamKey
impl Hash for SvcbParamKey
sourceimpl Ord for SvcbParamKey
impl Ord for SvcbParamKey
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<Ref: AsRef<[u8]>> Parse<Ref> for SvcbParamKey
impl<Ref: AsRef<[u8]>> Parse<Ref> for SvcbParamKey
sourceimpl PartialEq<SvcbParamKey> for SvcbParamKey
impl PartialEq<SvcbParamKey> for SvcbParamKey
sourceimpl PartialEq<SvcbParamKey> for u16
impl PartialEq<SvcbParamKey> for u16
sourcefn eq(&self, other: &SvcbParamKey) -> bool
fn eq(&self, other: &SvcbParamKey) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialEq<u16> for SvcbParamKey
impl PartialEq<u16> for SvcbParamKey
sourceimpl PartialOrd<SvcbParamKey> for SvcbParamKey
impl PartialOrd<SvcbParamKey> for SvcbParamKey
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<SvcbParamKey> for u16
impl PartialOrd<SvcbParamKey> for u16
sourcefn partial_cmp(&self, other: &SvcbParamKey) -> Option<Ordering>
fn partial_cmp(&self, other: &SvcbParamKey) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PartialOrd<u16> for SvcbParamKey
impl PartialOrd<u16> for SvcbParamKey
sourcefn partial_cmp(&self, other: &u16) -> Option<Ordering>
fn partial_cmp(&self, other: &u16) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl Copy for SvcbParamKey
impl Eq for SvcbParamKey
Auto Trait Implementations
impl RefUnwindSafe for SvcbParamKey
impl Send for SvcbParamKey
impl Sync for SvcbParamKey
impl Unpin for SvcbParamKey
impl UnwindSafe for SvcbParamKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
sourcefn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.