[−][src]Struct trust_dns_proto::op::Edns
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 emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
[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 PartialEq<Edns> for Edns
[src]
impl Clone for Edns
[src]
fn clone(&self) -> Edns
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Edns
[src]
impl Debug for Edns
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,