pub struct OptHeader { /* private fields */ }
Expand description
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§
Source§impl OptHeader
impl OptHeader
pub fn for_record_slice(slice: &[u8]) -> &OptHeader
pub fn for_record_slice_mut(slice: &mut [u8]) -> &mut OptHeader
pub fn udp_payload_size(&self) -> u16
pub fn set_udp_payload_size(&mut self, value: u16)
pub fn rcode(&self, header: Header) -> OptRcode
pub fn set_rcode(&mut self, rcode: OptRcode)
pub fn version(&self) -> u8
pub fn set_version(&mut self, version: u8)
pub fn dnssec_ok(&self) -> bool
pub fn set_dnssec_ok(&mut self, value: bool)
Trait Implementations§
impl Copy for OptHeader
impl Eq for OptHeader
impl StructuralPartialEq for OptHeader
Auto Trait Implementations§
impl Freeze for OptHeader
impl RefUnwindSafe for OptHeader
impl Send for OptHeader
impl Sync for OptHeader
impl Unpin for OptHeader
impl UnwindSafe for OptHeader
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
Mutably borrows from an owned value. Read more