Struct domain::rdata::rfc1035::Wks [−][src]
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]
impl<B: AsRef<WksBitmap>> Wks<B>
pub fn new(address: Ipv4Addr, protocol: u8, bitmap: B) -> Self
[src]
pub fn new(address: Ipv4Addr, protocol: u8, bitmap: B) -> Self
Creates a new record data from components.
pub fn address(&self) -> Ipv4Addr
[src]
pub fn address(&self) -> Ipv4Addr
The IPv4 address of the host this record refers to.
pub fn protocol(&self) -> u8
[src]
pub 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.
pub fn bitmap(&self) -> &WksBitmap
[src]
pub fn bitmap(&self) -> &WksBitmap
A bitmap indicating the ports where service is being provided.
pub fn serves(&self, port: u16) -> bool
[src]
pub fn serves(&self, port: u16) -> bool
Returns whether a certain service is being provided.
ⓘImportant traits for WksIter<'a>pub fn iter(&self) -> WksIter
[src]
pub fn iter(&self) -> WksIter
Returns an iterator over the served ports.
impl Wks<WksBitmapBuf>
[src]
impl Wks<WksBitmapBuf>
pub fn scan<S: Scanner>(
scanner: &mut S,
origin: Option<&DNameSlice>
) -> ScanResult<Self>
[src]
pub fn scan<S: Scanner>(
scanner: &mut S,
origin: Option<&DNameSlice>
) -> ScanResult<Self>
Trait Implementations
impl<B: Clone + AsRef<WksBitmap>> Clone for Wks<B>
[src]
impl<B: Clone + AsRef<WksBitmap>> Clone for Wks<B>
fn clone(&self) -> 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[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<B: Debug + AsRef<WksBitmap>> Debug for Wks<B>
[src]
impl<B: Debug + AsRef<WksBitmap>> Debug for Wks<B>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<B: Eq + AsRef<WksBitmap>> Eq for Wks<B>
[src]
impl<B: Eq + AsRef<WksBitmap>> Eq for Wks<B>
impl<B: PartialEq + AsRef<WksBitmap>> PartialEq for Wks<B>
[src]
impl<B: PartialEq + AsRef<WksBitmap>> PartialEq for Wks<B>
fn eq(&self, other: &Wks<B>) -> bool
[src]
fn eq(&self, other: &Wks<B>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Wks<B>) -> bool
[src]
fn ne(&self, other: &Wks<B>) -> bool
This method tests for !=
.
impl<B: AsRef<WksBitmap>> RecordData for Wks<B>
[src]
impl<B: AsRef<WksBitmap>> RecordData for Wks<B>
fn rtype(&self) -> Rtype
[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<()>
[src]
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]
impl<'a> ParsedRecordData<'a> for Wks<&'a WksBitmap>
fn parse(rtype: Rtype, parser: &mut Parser<'a>) -> ParseResult<Option<Self>>
[src]
fn parse(rtype: Rtype, parser: &mut Parser<'a>) -> ParseResult<Option<Self>>
Parses the record data out of a parser. Read more
impl<B: AsRef<WksBitmap>> Display for Wks<B>
[src]
impl<B: AsRef<WksBitmap>> Display for Wks<B>