pub struct Edns { /* private fields */ }
Expand description
Edns implements the higher level concepts for working with extended dns as it is used to create or be created from OPT record data.
Implementations§
Source§impl Edns
impl Edns
Sourcepub fn rcode_high(&self) -> u8
pub fn rcode_high(&self) -> u8
The high order bytes for the response code in the DNS Message
Sourcepub fn max_payload(&self) -> u16
pub fn max_payload(&self) -> u16
Maximum supported size of the DNS payload
Sourcepub fn option(&self, code: EdnsCode) -> Option<&EdnsOption>
pub fn option(&self, code: EdnsCode) -> Option<&EdnsOption>
Returns the Option associated with the code
Sourcepub fn options_mut(&mut self) -> &mut OPT
pub fn options_mut(&mut self) -> &mut OPT
Returns a mutable options portion of EDNS
Sourcepub fn set_rcode_high(&mut self, rcode_high: u8) -> &mut Self
pub fn set_rcode_high(&mut self, rcode_high: u8) -> &mut Self
Set the high order bits for the result code.
Sourcepub fn set_version(&mut self, version: u8) -> &mut Self
pub fn set_version(&mut self, version: u8) -> &mut Self
Set the EDNS version
Sourcepub fn enable_dnssec(&mut self)
Available on crate feature dnssec
only.
pub fn enable_dnssec(&mut self)
dnssec
only.Creates a new extended DNS object prepared for DNSSEC messages.
Sourcepub fn set_default_algorithms(&mut self) -> &mut Self
Available on crate feature dnssec
only.
pub fn set_default_algorithms(&mut self) -> &mut Self
dnssec
only.Set the default algorithms which are supported by this handle
Set both Algorithms Understood (DAU) and Hash Understood (DHU) to the same algorithms.
Sourcepub fn set_dnssec_ok(&mut self, dnssec_ok: bool) -> &mut Self
pub fn set_dnssec_ok(&mut self, dnssec_ok: bool) -> &mut Self
Set to true if DNSSEC is supported
Sourcepub fn set_max_payload(&mut self, max_payload: u16) -> &mut Self
pub fn set_max_payload(&mut self, max_payload: u16) -> &mut Self
Set the maximum payload which can be supported
From RFC 6891: Values lower than 512 MUST be treated as equal to 512
Sourcepub fn set_option(&mut self, option: EdnsOption)
👎Deprecated: Please use options_mut().insert() to modify
pub fn set_option(&mut self, option: EdnsOption)
Set the specified EDNS option
Trait Implementations§
Source§impl BinEncodable for Edns
impl BinEncodable for Edns
Source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
impl Eq for Edns
impl StructuralPartialEq for Edns
Auto Trait Implementations§
impl Freeze for Edns
impl RefUnwindSafe for Edns
impl Send for Edns
impl Sync for Edns
impl Unpin for Edns
impl UnwindSafe for Edns
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.