Struct trust_dns_proto::op::Edns [−][src]
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]
impl Edns
pub fn new() -> Self
[src]
pub fn new() -> Self
Creates a new extended DNS object.
pub fn rcode_high(&self) -> u8
[src]
pub fn rcode_high(&self) -> u8
The high order bytes for the response code in the DNS Message
pub fn version(&self) -> u8
[src]
pub fn version(&self) -> u8
Returns the EDNS version
pub fn dnssec_ok(&self) -> bool
[src]
pub fn dnssec_ok(&self) -> bool
Specifies that DNSSec is supported for this Client or Server
pub fn max_payload(&self) -> u16
[src]
pub fn max_payload(&self) -> u16
Maximum supported size of the DNS payload
pub fn option(&self, code: &EdnsCode) -> Option<&EdnsOption>
[src]
pub fn option(&self, code: &EdnsCode) -> Option<&EdnsOption>
Returns the Option associated with the code
pub fn options(&self) -> &OPT
[src]
pub fn options(&self) -> &OPT
Returns the options portion of EDNS
pub fn set_rcode_high(&mut self, rcode_high: u8)
[src]
pub fn set_rcode_high(&mut self, rcode_high: u8)
Set the high order bits for the result code.
pub fn set_version(&mut self, version: u8)
[src]
pub fn set_version(&mut self, version: u8)
Set the EDNS version
pub fn set_dnssec_ok(&mut self, dnssec_ok: bool)
[src]
pub fn set_dnssec_ok(&mut self, dnssec_ok: bool)
Set to true if DNSSec is supported
pub fn set_max_payload(&mut self, max_payload: u16)
[src]
pub fn set_max_payload(&mut self, max_payload: u16)
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]
pub fn set_option(&mut self, option: EdnsOption)
Set the specified EDNS option
Trait Implementations
impl Debug for Edns
[src]
impl Debug for Edns
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 Edns
[src]
impl PartialEq for Edns
fn eq(&self, other: &Edns) -> bool
[src]
fn eq(&self, other: &Edns) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Edns) -> bool
[src]
fn ne(&self, other: &Edns) -> bool
This method tests for !=
.
impl Clone for Edns
[src]
impl Clone for Edns
fn clone(&self) -> Edns
[src]
fn clone(&self) -> Edns
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 Default for Edns
[src]
impl Default for Edns
impl<'a> From<&'a Record> for Edns
[src]
impl<'a> From<&'a Record> for Edns
impl<'a> From<&'a Edns> for Record
[src]
impl<'a> From<&'a Edns> for Record
fn from(value: &'a Edns) -> Record
[src]
fn from(value: &'a Edns) -> Record
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 BinEncodable for Edns
[src]
impl BinEncodable for Edns
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
[src]
fn emit(&self, encoder: &mut BinEncoder) -> ProtoResult<()>
Write the type to the stream
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
[src]
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
Returns the object in binary form