pub struct Wks<'a> {
pub address: Ipv4Addr,
pub protocol: u8,
pub bitmap: &'a [u8],
}Expand description
WKS record data: well-known services offered by a host
(RFC 1035 §3.4.2). Class IN only. Deprecated in practice (RFC 1123
§2.2).
Fields§
§address: Ipv4AddrThe host address.
protocol: u8IP protocol number (6 = TCP, 17 = UDP).
bitmap: &'a [u8]Port bitmap: bit n (MSB-first) set means port n is offered.
Implementations§
Trait Implementations§
Source§impl ComposeRdata for Wks<'_>
impl ComposeRdata for Wks<'_>
impl<'a> Copy for Wks<'a>
impl<'a> Eq for Wks<'a>
Source§impl<'a> ParseRdata<'a> for Wks<'a>
impl<'a> ParseRdata<'a> for Wks<'a>
Source§const CLASS: Option<Class>
const CLASS: Option<Class>
For class-specific types (RFC 3597 §4: “class-specific” RDATA such as
A and AAAA, whose format is only defined in class IN), the class the
format is defined for. Records of another class are left as
RData::Unknown. None (the default) means class-independent.Source§fn parse_rdata(rdata: &mut WireReader<'a>) -> Result<Self>
fn parse_rdata(rdata: &mut WireReader<'a>) -> Result<Self>
Parses RDATA from
rdata, a reader whose window is exactly the
record’s RDATA (RDLENGTH bytes) but which can still follow
compression pointers into the whole message. Read moreSource§impl ParseRdataText for Wks<'_>
impl ParseRdataText for Wks<'_>
Source§fn parse_text<B: OutBuf + ?Sized>(
s: &mut Scanner<'_>,
out: &mut B,
) -> Result<()>
fn parse_text<B: OutBuf + ?Sized>( s: &mut Scanner<'_>, out: &mut B, ) -> Result<()>
<address> <protocol> <service>... (RFC 1035 §3.4.2; RFC 1010
mnemonics): the protocol and the services are numbers or common
mnemonics (TCP, UDP; smtp, domain, …), the services in
any order, possibly none.
Source§fn from_text<'b>(text: &str, buf: &'b mut [u8]) -> Result<Self>where
Self: ParseRdata<'b>,
fn from_text<'b>(text: &str, buf: &'b mut [u8]) -> Result<Self>where
Self: ParseRdata<'b>,
Parses standalone presentation-format RDATA (relative names are
completed with the root; newlines are blanks) into
buf and
returns a view over it. The RFC 3597 generic form
\# <length> <hex> is accepted too. Read moreimpl<'a> StructuralPartialEq for Wks<'a>
Auto Trait Implementations§
impl<'a> Freeze for Wks<'a>
impl<'a> RefUnwindSafe for Wks<'a>
impl<'a> Send for Wks<'a>
impl<'a> Sync for Wks<'a>
impl<'a> Unpin for Wks<'a>
impl<'a> UnsafeUnpin for Wks<'a>
impl<'a> UnwindSafe for Wks<'a>
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