Skip to main content

OptionCode

Enum OptionCode 

Source
#[repr(u16)]
pub enum OptionCode {
Show 18 variants LLQ = 1, UL = 2, NSID = 3, DAU = 5, DHU = 6, N3U = 7, EDNSCLIENTSUBNET = 8, EDNSEXPIRE = 9, COOKIE = 10, EDNSTCPKEEPALIVE = 11, PADDING = 12, CHAIN = 13, EDNSKEYTAG = 14, EDNSERROR = 15, EDNSCLIENTTAG = 16, EDNSSERVERTAG = 17, DEVICEID = 26_946, UNKNOWN = 26947,
}

Variants§

§

LLQ = 1

Long-Lived Queries

§

UL = 2

Update Leases

§

NSID = 3

Name Server Identifier

§

DAU = 5

DNSSEC Algorithm Understood

§

DHU = 6

DS Hash Understood

§

N3U = 7

NSEC3 Hash Understood

§

EDNSCLIENTSUBNET = 8

EDNS0 option to allow Recursive Resolvers, if they are willing, to forward details about the origin network from which a query is coming when talking to other nameservers

§

EDNSEXPIRE = 9

See https://tools.ietf.org/html/rfc7314

§

COOKIE = 10

See https://tools.ietf.org/html/rfc7873#section-4

§

EDNSTCPKEEPALIVE = 11

Signals a variable idle timeout

§

PADDING = 12

Allows DNS clients and servers to pad requests and responses by a variable number of octets

§

CHAIN = 13

Allows a security-aware validating resolver to send a single query requesting a complete validation path along with the regular answer

§

EDNSKEYTAG = 14

Provides origin authentication using digital signatures

§

EDNSERROR = 15

Returning additional information about the cause of DNS errors

§

EDNSCLIENTTAG = 16

Draft, usage is being determined. See https://www.ietf.org/archive/id/draft-bellis-dnsop-edns-tags-01.txt

§

EDNSSERVERTAG = 17

Draft, usage is being determined. See https://www.ietf.org/archive/id/draft-bellis-dnsop-edns-tags-01.txt

§

DEVICEID = 26_946

A way of identifying a device via DNS in the OPT RDATA

§

UNKNOWN = 26947

Implementations§

Source§

impl OptionCode

Source

pub fn from_raw(val: u16) -> Self

Trait Implementations§

Source§

impl Clone for OptionCode

Source§

fn clone(&self) -> OptionCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for OptionCode

Source§

impl Debug for OptionCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for OptionCode

Source§

impl PartialEq for OptionCode

Source§

fn eq(&self, other: &OptionCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for OptionCode

Source§

impl TryFrom<u16> for OptionCode

Source§

type Error = TryFromPrimitiveError<OptionCode>

The type returned in the event of a conversion error.
Source§

fn try_from(number: u16) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for OptionCode

Source§

const NAME: &'static str = "OptionCode"

Source§

type Primitive = u16

Source§

fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.