Struct trust_dns::rr::resource::Record [] [src]

pub struct Record {
    // some fields omitted
}

Methods

impl Record
[src]

fn new() -> Record

Creates a not very useful empty record, use the setters to build a more useful object There are no optional elements in this object, defaults are an empty name, type A, class IN, ttl of 0 and the 0.0.0.0 ip address.

fn name(&mut self, name: Name) -> &mut Self

fn add_name(&mut self, label: String) -> &mut Self

fn rr_type(&mut self, rr_type: RecordType) -> &mut Self

fn dns_class(&mut self, dns_class: DNSClass) -> &mut Self

fn ttl(&mut self, ttl: u32) -> &mut Self

fn rdata(&mut self, rdata: RData) -> &mut Self

fn get_name(&self) -> &Name

fn get_rr_type(&self) -> RecordType

fn get_dns_class(&self) -> DNSClass

fn get_ttl(&self) -> u32

fn get_rdata(&self) -> &RData

Trait Implementations

impl Clone for Record
[src]

fn clone(&self) -> Record

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 Debug for Record
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Ord for Record
[src]

fn cmp(&self, __arg_0: &Record) -> Ordering

This method returns an Ordering between self and other. Read more

impl Hash for Record
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Eq for Record
[src]

impl BinSerializable<Record> for Record
[src]

fn read(decoder: &mut BinDecoder) -> DecodeResult<Record>

parse a resource record line example: WARNING: the record_bytes is 100% consumed and destroyed in this parsing process

fn emit(&self, encoder: &mut BinEncoder) -> EncodeResult

impl PartialEq for Record
[src]

RFC 2136 DNS Update April 1997

1.1.1. Two RRs are considered equal if their NAME, CLASS, TYPE, RDLENGTH and RDATA fields are equal. Note that the time-to-live (TTL) field is explicitly excluded from the comparison.

1.1.2. The rules for comparison of character strings in names are specified in [RFC1035 2.3.3]. i.e. case insensitive

fn eq(&self, other: &Self) -> bool

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

fn ne(&self, other: &Self) -> bool

This method tests for !=.

impl PartialOrd<Record> for Record
[src]

fn partial_cmp(&self, other: &Record) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

fn lt(&self, other: &Rhs) -> bool
1.0.0

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, other: &Rhs) -> bool
1.0.0

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn gt(&self, other: &Rhs) -> bool
1.0.0

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, other: &Rhs) -> bool
1.0.0

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a> From<&'a Edns> for Record
[src]

fn from(value: &'a Edns) -> Record

This returns a Resource Record that is formatted for Edns(0). Note: the rcode_high value is only part of the rcode, the rest is part of the base