Struct trust_dns_proto::op::Edns
source · [−]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
sourceimpl 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 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)
Please use options_mut().insert() to modify
Set the specified EDNS option
Trait Implementations
sourceimpl BinEncodable for Edns
impl BinEncodable for Edns
sourcefn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
Write the type to the stream
sourcefn to_bytes(&self) -> ProtoResult<Vec<u8>>
fn to_bytes(&self) -> ProtoResult<Vec<u8>>
Returns the object in binary form
impl StructuralPartialEq for Edns
Auto Trait Implementations
impl RefUnwindSafe for Edns
impl Send for Edns
impl Sync for Edns
impl Unpin for Edns
impl UnwindSafe for Edns
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more