pub struct A { /* private fields */ }
Expand description
A record data.
A records convey the IPv4 address of a host. The wire format is the 32 bit IPv4 address in network byte order. The representation file format is the usual dotted notation.
The A record type is defined in RFC 1035, section 3.4.1.
Implementations§
source§impl A
impl A
sourcepub fn from_octets(a: u8, b: u8, c: u8, d: u8) -> A
pub fn from_octets(a: u8, b: u8, c: u8, d: u8) -> A
Creates a new A record from the IPv4 address components.
pub fn addr(&self) -> Ipv4Addr
pub fn set_addr(&mut self, addr: Ipv4Addr)
pub fn parse<Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'_, Octs>, ) -> Result<Self, ParseError>
pub fn scan<S: Scanner>(scanner: &mut S) -> Result<Self, S::Error>
Trait Implementations§
source§impl CanonicalOrd for A
impl CanonicalOrd for A
source§fn canonical_cmp(&self, other: &Self) -> Ordering
fn canonical_cmp(&self, other: &Self) -> Ordering
Returns the canonical ordering between
self
and other
.source§fn canonical_lt(&self, other: &Rhs) -> bool
fn canonical_lt(&self, other: &Rhs) -> bool
Returns whether
self
is canonically less than other
.source§fn canonical_le(&self, other: &Rhs) -> bool
fn canonical_le(&self, other: &Rhs) -> bool
Returns whether
self
is canonically less than or equal to other
.source§fn canonical_gt(&self, other: &Rhs) -> bool
fn canonical_gt(&self, other: &Rhs) -> bool
Returns whether
self
is canonically greater than other
.source§fn canonical_ge(&self, other: &Rhs) -> bool
fn canonical_ge(&self, other: &Rhs) -> bool
Returns whether
self
is canonically greater than or equal to other
.source§impl ComposeRecordData for A
impl ComposeRecordData for A
source§fn rdlen(&self, _compress: bool) -> Option<u16>
fn rdlen(&self, _compress: bool) -> Option<u16>
Returns the length of the record data if available. Read more
source§fn compose_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the wire format of the record data into
target
.source§fn compose_canonical_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_canonical_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the canonical wire format of the record data into
target
.source§fn compose_len_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_len_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the record data prefixed with its length.
source§fn compose_canonical_len_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_canonical_len_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the record data prefixed with its length.
source§impl<O, N> From<A> for AllRecordData<O, N>
impl<O, N> From<A> for AllRecordData<O, N>
source§impl<O, N> From<A> for ZoneRecordData<O, N>
impl<O, N> From<A> for ZoneRecordData<O, N>
source§impl OctetsFrom<A> for A
impl OctetsFrom<A> for A
type Error = Infallible
source§fn octets_from(source: Source) -> Self
fn octets_from(source: Source) -> Self
Performs an infallible conversion.
source§impl Ord for A
impl Ord for A
source§impl<'a, Octs: AsRef<[u8]> + ?Sized> ParseRecordData<'a, Octs> for A
impl<'a, Octs: AsRef<[u8]> + ?Sized> ParseRecordData<'a, Octs> for A
source§fn parse_rdata(
rtype: Rtype,
parser: &mut Parser<'a, Octs>,
) -> Result<Option<Self>, ParseError>
fn parse_rdata( rtype: Rtype, parser: &mut Parser<'a, Octs>, ) -> Result<Option<Self>, ParseError>
Parses the record data. Read more
source§impl PartialOrd for A
impl PartialOrd for A
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl RecordData for A
impl RecordData for A
impl Eq for A
impl StructuralPartialEq for A
Auto Trait Implementations§
impl Freeze for A
impl RefUnwindSafe for A
impl Send for A
impl Sync for A
impl Unpin for A
impl UnwindSafe for 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
source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.