Struct resolve::message::Resource [] [src]

pub struct Resource<'a> {
    pub name: String,
    pub r_type: RecordType,
    pub r_class: Class,
    pub ttl: u32,
    // some fields omitted
}

Represents a resource record item.

Fields

name: String

Resource name

r_type: RecordType

Resource type

r_class: Class

Resource class

ttl: u32

Time-to-live

Methods

impl<'a> Resource<'a>
[src]

fn new(name: String, r_type: RecordType, r_class: Class, ttl: u32) -> Resource<'a>

Constructs a new Resource.

fn read_rdata<R: Record>(&self) -> Result<R, DecodeError>

Decodes resource data into the given Record type.

fn write_rdata<R: Record>(&mut self, record: &R) -> Result<()EncodeError>

Encodes resource data from the given Record type.

Trait Implementations

impl<'a> PartialEq for Resource<'a>
[src]

fn eq(&self, __arg_0: &Resource<'a>) -> bool

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

fn ne(&self, __arg_0: &Resource<'a>) -> bool

This method tests for !=.

impl<'a> Eq for Resource<'a>
[src]

impl<'a> Debug for Resource<'a>
[src]

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

Formats the value using the given formatter.

impl<'a> Clone for Resource<'a>
[src]

fn clone(&self) -> Resource<'a>

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