pub enum EdnsOption {
NSID(Vec<u8>),
DAU(Vec<u8>),
DHU(Vec<u8>),
N3U(Vec<u8>),
ClientSubnet {
family: u16,
source_prefix: u8,
scope_prefix: u8,
address: Vec<u8>,
},
Cookie {
client: Vec<u8>,
server: Vec<u8>,
},
ExtendedDnsError {
info_code: u16,
extra_text: String,
},
Owner {
version: u8,
seq: u8,
primary_mac: MacAddress,
},
Unknown {
code: u16,
data: Vec<u8>,
},
}Expand description
EDNS0 option parsed from OPT record RDATA.
Variants§
NSID(Vec<u8>)
NSID - Name Server Identifier (RFC 5001)
DAU(Vec<u8>)
DAU - DNSSEC Algorithm Understood (RFC 6975)
DHU(Vec<u8>)
DHU - DS Hash Understood (RFC 6975)
N3U(Vec<u8>)
N3U - NSEC3 Hash Understood (RFC 6975)
ClientSubnet
Client Subnet (RFC 7871)
Cookie
DNS Cookie (RFC 7873)
ExtendedDnsError
Extended DNS Error (RFC 8914)
Owner
Owner option (Apple mDNS)
Unknown
Unknown/unsupported option
Implementations§
Source§impl EdnsOption
impl EdnsOption
Sourcepub fn parse(code: u16, data: &[u8]) -> Result<Self, FieldError>
pub fn parse(code: u16, data: &[u8]) -> Result<Self, FieldError>
Parse a single EDNS0 option from wire format.
data contains the option data (after code and length).
Sourcepub fn build_data(&self) -> Vec<u8> ⓘ
pub fn build_data(&self) -> Vec<u8> ⓘ
Serialize the option data (without the code and length header).
Trait Implementations§
Source§impl Clone for EdnsOption
impl Clone for EdnsOption
Source§fn clone(&self) -> EdnsOption
fn clone(&self) -> EdnsOption
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EdnsOption
impl Debug for EdnsOption
Source§impl PartialEq for EdnsOption
impl PartialEq for EdnsOption
impl StructuralPartialEq for EdnsOption
Auto Trait Implementations§
impl Freeze for EdnsOption
impl RefUnwindSafe for EdnsOption
impl Send for EdnsOption
impl Sync for EdnsOption
impl Unpin for EdnsOption
impl UnsafeUnpin for EdnsOption
impl UnwindSafe for EdnsOption
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