Struct simple_dns::ResourceRecord[][src]

pub struct ResourceRecord<'a> {
    pub name: Name<'a>,
    pub class: CLASS,
    pub ttl: u32,
    pub rdata: RData<'a>,
}
Expand description

Resource Records are used to represent the answer, authority, and additional sections in DNS packets.

Fields

name: Name<'a>

A Name to which this resource record pertains.

class: CLASS

A CLASS that defines the class of the rdata field

ttl: u32

The time interval (in seconds) that the resource record may becached before it should be discarded.
Zero values are interpreted to mean that the RR can only be used for the transaction in progress, and should not be cached.

rdata: RData<'a>

A RData with the contents of this resource record

Implementations

Creates a new ResourceRecord

Return true if current resource match given query class

Return true if current resource match given query type The types A and AAAA will match each other

Trait Implementations

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.