Struct domain::rdata::rfc1035::Wks
[−]
[src]
pub struct Wks<B: AsRef<WksBitmap>> { /* fields omitted */ }
Wks record data.
Wks records describe the well-known services supported by a particular protocol on a particular internet address.
The Wks record type is defined in RFC 1035, section 3.4.2.
Methods
impl<B: AsRef<WksBitmap>> Wks<B>
[src]
fn new(address: Ipv4Addr, protocol: u8, bitmap: B) -> Self
Creates a new record data from components.
fn address(&self) -> Ipv4Addr
The IPv4 address of the host this record refers to.
fn protocol(&self) -> u8
The protocol number of the protocol this record refers to.
This will typically be 6
for TCP or 17
for UDP.
fn bitmap(&self) -> &WksBitmap
A bitmap indicating the ports where service is being provided.
fn serves(&self, port: u16) -> bool
Returns whether a certain service is being provided.
fn iter(&self) -> WksIter
Returns an iterator over the served ports.
impl Wks<WksBitmapBuf>
[src]
fn scan<S: Scanner>(
scanner: &mut S,
origin: Option<&DNameSlice>
) -> ScanResult<Self>
scanner: &mut S,
origin: Option<&DNameSlice>
) -> ScanResult<Self>
Trait Implementations
impl<B: Clone + AsRef<WksBitmap>> Clone for Wks<B>
[src]
fn clone(&self) -> Wks<B>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<B: Debug + AsRef<WksBitmap>> Debug for Wks<B>
[src]
impl<B: Eq + AsRef<WksBitmap>> Eq for Wks<B>
[src]
impl<B: PartialEq + AsRef<WksBitmap>> PartialEq for Wks<B>
[src]
fn eq(&self, __arg_0: &Wks<B>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Wks<B>) -> bool
This method tests for !=
.
impl<B: AsRef<WksBitmap>> RecordData for Wks<B>
[src]
fn rtype(&self) -> Rtype
Returns the record type for this record data instance. Read more
fn compose<C: AsMut<Composer>>(&self, target: C) -> ComposeResult<()>
Appends the record data to the end of a composer.
impl<'a> ParsedRecordData<'a> for Wks<&'a WksBitmap>
[src]
fn parse(rtype: Rtype, parser: &mut Parser<'a>) -> ParseResult<Option<Self>>
Parses the record data out of a parser. Read more