Enum domain::iana::opt::OptionCode [−][src]
pub enum OptionCode { Llq, Ul, Nsid, Dau, Dhu, N3u, EdnsClientSubnet, EdnsExpire, Cookie, EdnsTcpKeepalive, Padding, Chain, EdnsKeyTag, Int(u16), }
DNS EDNS0 Option Codes (OPT)
The record data of OPT records is a sequence of options. The type of each of these options is given through an option code, a 16 bit value.
The currently assigned option codes can be found in http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11
Variants
Llq
Ul
Nsid
Dau
Dhu
N3u
EdnsClientSubnet
EdnsExpire
Cookie
EdnsTcpKeepalive
Padding
Chain
EdnsKeyTag
Int(u16)
A raw class value given through its integer.
Methods
impl OptionCode
[src]
impl OptionCode
pub fn from_int(value: u16) -> Self
[src]
pub fn from_int(value: u16) -> Self
Returns the option code for the given raw integer value.
pub fn to_int(self) -> u16
[src]
pub fn to_int(self) -> u16
Returns the raw integer value for this option code.
Trait Implementations
impl Clone for OptionCode
[src]
impl Clone for OptionCode
fn clone(&self) -> OptionCode
[src]
fn clone(&self) -> OptionCode
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for OptionCode
[src]
impl Copy for OptionCode
impl Debug for OptionCode
[src]
impl Debug for OptionCode
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<u16> for OptionCode
[src]
impl From<u16> for OptionCode
impl From<OptionCode> for u16
[src]
impl From<OptionCode> for u16
fn from(value: OptionCode) -> Self
[src]
fn from(value: OptionCode) -> Self
Performs the conversion.
impl Display for OptionCode
[src]
impl Display for OptionCode
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for OptionCode
[src]
impl PartialEq for OptionCode
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl PartialEq<u16> for OptionCode
[src]
impl PartialEq<u16> for OptionCode
fn eq(&self, other: &u16) -> bool
[src]
fn eq(&self, other: &u16) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl PartialEq<OptionCode> for u16
[src]
impl PartialEq<OptionCode> for u16
fn eq(&self, other: &OptionCode) -> bool
[src]
fn eq(&self, other: &OptionCode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for OptionCode
[src]
impl Eq for OptionCode
impl PartialOrd for OptionCode
[src]
impl PartialOrd for OptionCode
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
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
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialOrd<u16> for OptionCode
[src]
impl PartialOrd<u16> for OptionCode
fn partial_cmp(&self, other: &u16) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &u16) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
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
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialOrd<OptionCode> for u16
[src]
impl PartialOrd<OptionCode> for u16
fn partial_cmp(&self, other: &OptionCode) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &OptionCode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
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
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for OptionCode
[src]
impl Ord for OptionCode
fn cmp(&self, other: &Self) -> Ordering
[src]
fn cmp(&self, other: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for OptionCode
[src]
impl Hash for OptionCode
Auto Trait Implementations
impl Send for OptionCode
impl Send for OptionCode
impl Sync for OptionCode
impl Sync for OptionCode