Struct domain::base::opt::OptHeader [−][src]
The header of an OPT record.
The OPT record reappropriates the record header for encoding some
basic information. This type provides access to this information. It
consists of the record header accept for its rdlen
field.
This is so that OptBuilder
can safely deref to this type.
Implementations
impl OptHeader
[src]
pub fn for_record_slice(slice: &[u8]) -> &OptHeader
[src]
Returns a reference to an OPT header pointing into a record’s octets.
pub fn for_record_slice_mut(slice: &mut [u8]) -> &mut OptHeader
[src]
Returns a mutable reference pointing into a record’s octets.
pub fn udp_payload_size(&self) -> u16
[src]
Returns the UDP payload size.
Through this field a sender of a message can signal the maximum size of UDP payload the sender is able to handle when receiving messages. This value refers to the abilities of the sender’s DNS implementation, not such things as network MTUs. Which means that the largest UDP payload that can actually be sent back to the sender may be smaller.
pub fn set_udp_payload_size(&mut self, value: u16)
[src]
Sets the UDP payload size value.
pub fn rcode(&self, header: Header) -> OptRcode
[src]
Returns the extended rcode.
Some of the bits of the rcode are stored in the regular message header. Such a header needs to be passed to the method.
pub fn set_rcode(&mut self, rcode: OptRcode)
[src]
Sets the extend rcode of the OPT header.
This method only sets the upper bits of the rcode. The lower bits need to be set in the message header.
pub fn version(&self) -> u8
[src]
Returns the EDNS version of the OPT header.
Only EDNS version 0 is currently defined.
pub fn set_version(&mut self, version: u8)
[src]
Sets the EDNS version of the OPT header.
pub fn dnssec_ok(&self) -> bool
[src]
Returns the value of the DNSSEC OK (DO) bit.
By setting this bit, a resolver indicates that it is interested in also receiving the DNSSEC-related resource records necessary to validate an answer. The bit and the related procedures are defined in RFC 3225.
pub fn set_dnssec_ok(&mut self, value: bool)
[src]
Sets the DNSSEC OK (DO) bit to the given value.
Trait Implementations
impl Clone for OptHeader
[src]
impl Compose for OptHeader
[src]
fn compose<T: OctetsBuilder>(&self, target: &mut T) -> Result<(), ShortBuf>
[src]
fn compose_canonical<T: OctetsBuilder>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
[src]
&self,
target: &mut T
) -> Result<(), ShortBuf>
impl Copy for OptHeader
[src]
impl Debug for OptHeader
[src]
impl Default for OptHeader
[src]
impl Eq for OptHeader
[src]
impl PartialEq<OptHeader> for OptHeader
[src]
impl StructuralEq for OptHeader
[src]
impl StructuralPartialEq for OptHeader
[src]
Auto Trait Implementations
impl RefUnwindSafe for OptHeader
impl Send for OptHeader
impl Sync for OptHeader
impl Unpin for OptHeader
impl UnwindSafe for OptHeader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<Source, Target> OctetsInto<Target> for Source where
Target: OctetsFrom<Source>,
[src]
Target: OctetsFrom<Source>,
pub fn octets_into(Self) -> Result<Target, ShortBuf>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,