[−][src]Struct trust_dns::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() -> Edns
[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 Debug for Edns
[src]
impl Clone for Edns
[src]
fn clone(&self) -> Edns
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Edns> 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<'a> From<&'a Record> for Edns
[src]
impl BinEncodable for Edns
[src]
fn emit(&self, encoder: &mut BinEncoder) -> Result<(), ProtoError>
[src]
default fn to_bytes(&self) -> Result<Vec<u8>, ProtoError>
[src]
Returns the object in binary form
impl Default for Edns
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,