[−][src]Struct rusty_dns::dns_packet::dns_resource_record::DnsResourceRecord
DNS Resource Record.
Fields
name: String
Name of the resource record.
rrtype: u16
Type of the resource record.
class: u16
Class of the resource record.
ttl: u32
TTL (Time to Live) of the resource record.
rdlength: u16
Length in bytes of the resource record data.
rdata: DnsResourceRecordData
The actual data for the resource record.
Implementations
impl DnsResourceRecord
[src]
pub fn new(
name: String,
rrtype: u16,
class: u16,
ttl: u32,
rdlength: u16,
rdata: DnsResourceRecordData
) -> Result<DnsResourceRecord, String>
[src]
name: String,
rrtype: u16,
class: u16,
ttl: u32,
rdlength: u16,
rdata: DnsResourceRecordData
) -> Result<DnsResourceRecord, String>
Create a DNS resource record.
pub fn parse_resource_records(
buf: &Vec<u8>,
start: usize,
rrcount: u16
) -> Result<(Vec<DnsResourceRecord>, usize), String>
[src]
buf: &Vec<u8>,
start: usize,
rrcount: u16
) -> Result<(Vec<DnsResourceRecord>, usize), String>
Parse a DNS resource record section (i.e. Answer, Additional) from a raw DNS packet.
pub fn serialize(
&self,
start: usize,
buf: &mut Vec<u8>,
domain_name_offsets: &mut HashMap<String, u16>
) -> Result<usize, String>
[src]
&self,
start: usize,
buf: &mut Vec<u8>,
domain_name_offsets: &mut HashMap<String, u16>
) -> Result<usize, String>
Serialize the DNS resource records into a DNS protocol conformant, network ready buffer.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DnsResourceRecord
impl Send for DnsResourceRecord
impl Sync for DnsResourceRecord
impl Unpin for DnsResourceRecord
impl UnwindSafe for DnsResourceRecord
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,