[][src]Struct trust_dns_proto::op::Edns

pub struct Edns { /* fields omitted */ }

Edns implements the higher level concepts for working with extended dns as it is used to create or be created from OPT record data.

Methods

impl Edns
[src]

pub fn new() -> Self
[src]

Creates a new extended DNS object.

pub fn rcode_high(&self) -> u8
[src]

The high order bytes for the response code in the DNS Message

pub fn version(&self) -> u8
[src]

Returns the EDNS version

pub fn dnssec_ok(&self) -> bool
[src]

Specifies that DNSSec is supported for this Client or Server

pub fn max_payload(&self) -> u16
[src]

Maximum supported size of the DNS payload

pub fn option(&self, code: &EdnsCode) -> Option<&EdnsOption>
[src]

Returns the Option associated with the code

pub fn options(&self) -> &OPT
[src]

Returns the options portion of EDNS

pub fn set_rcode_high(&mut self, rcode_high: u8)
[src]

Set the high order bits for the result code.

pub fn set_version(&mut self, version: u8)
[src]

Set the EDNS version

pub fn set_dnssec_ok(&mut self, dnssec_ok: bool)
[src]

Set to true if DNSSec is supported

pub fn set_max_payload(&mut self, max_payload: u16)
[src]

Set the maximum payload which can be supported From RFC 6891: Values lower than 512 MUST be treated as equal to 512

pub fn set_option(&mut self, option: EdnsOption)
[src]

Set the specified EDNS option

Trait Implementations

impl BinEncodable for Edns
[src]

fn to_bytes(&self) -> ProtoResult<Vec<u8>>
[src]

Returns the object in binary form

impl<'a> From<&'a Record> for Edns
[src]

impl<'a> From<&'a Edns> for Record
[src]

fn from(value: &'a Edns) -> Record
[src]

This returns a Resource Record that is formatted for Edns(0). Note: the rcode_high value is only part of the rcode, the rest is part of the base

impl Default for Edns
[src]

impl PartialEq<Edns> for Edns
[src]

impl Clone for Edns
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Edns
[src]

Auto Trait Implementations

impl Send for Edns

impl Sync for Edns

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T