Skip to main content

DoH

Struct DoH 

Source
pub struct DoH<'a> {
    pub name: String,
    pub type: Option<u32>,
    pub cd: Option<bool>,
    pub ct: Option<String>,
    pub do: Option<bool>,
    pub edns_client_subnet: Option<String>,
    /* private fields */
}

Fields§

§name: String§type: Option<u32>

RR type default = 1

§cd: Option<bool>

The checking disabled flag Use true to disable DNSSEC or false to enable DNSSEC validation default = false

§ct: Option<String>

Desired content type ct=application/dns-message for binary DNS-message ct=application/x-javascript for JSON text default = empty

§do: Option<bool>

DNSSEC OK flag if true, the DNSSEC records will be included in the response (RRSIG, NSEC, NSEC3) or false to ommit these values in the response default = false

§edns_client_subnet: Option<String>

Use IP address format with a subnet mask Examples: 1.2.3.4/24, 2001:700:300::/48 default = empty

Implementations§

Source§

impl<'a> DoH<'a>

Source

pub fn new(name: String) -> Self

Source

pub fn set_base_url(self, value: &'a str) -> Self

Source

pub fn set_ct(self, value: String) -> Self

Sets the desired content type

Source

pub fn set_type(self, value: u32) -> Self

Sets the RR type

Source

pub fn set_cd(self, value: bool) -> Self

Disable or enable DNSSEC check

Source

pub fn set_do(self, value: bool) -> Self

Include or ommit DNSSEC records

Source

pub fn set_edns_client_subnet(self, value: String) -> Self

Include or ommit DNSSEC records

Source

pub async fn resolve(&self) -> Result<Dns>

Trait Implementations§

Source§

impl<'a> Clone for DoH<'a>

Source§

fn clone(&self) -> DoH<'a>

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<'a> Debug for DoH<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for DoH<'a>

§

impl<'a> RefUnwindSafe for DoH<'a>

§

impl<'a> Send for DoH<'a>

§

impl<'a> Sync for DoH<'a>

§

impl<'a> Unpin for DoH<'a>

§

impl<'a> UnsafeUnpin for DoH<'a>

§

impl<'a> UnwindSafe for DoH<'a>

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.