[][src]Struct lib3h_mdns::record::Record

pub struct Record { /* fields omitted */ }

Methods

impl Record[src]

pub fn new(name: &str, url: &str, ttl: u32) -> Self[src]

Create a new record respecting the mDNS naming convention of the form "single-dns-label.local." with value ending with .local.

pub fn url(&self) -> &str[src]

Returns a reference to the IP address of a neighbor in the LAN.

pub fn networkid(&self) -> &str[src]

Returns a reference to the hostname of a neighbor in the LAN.

pub fn ttl(&self) -> u32[src]

Returns the time to leave value oif a Record.

pub fn new_own() -> Self[src]

Build a host own record. If there we fail to gather IPv4 addresses from the system, we fall back to "0.0.0.0" address.

pub fn to_answers_section(&self) -> AnswerSection[src]

Convert a Record to an Answer Reponse.

pub fn to_question_section(&self) -> QuerySection[src]

Convert a record to a question packet.

pub fn to_target(&self) -> Target[src]

pub fn to_dns_response_message(&self) -> DnsMessage[src]

Builds a DnsMessage from a MapRecord.

Trait Implementations

impl Clone for Record[src]

impl Debug for Record[src]

impl Eq for Record[src]

impl Ord for Record[src]

impl PartialEq<Record> for Record[src]

impl PartialOrd<Record> for Record[src]

impl StructuralEq for Record[src]

impl StructuralPartialEq for Record[src]

Auto Trait Implementations

impl RefUnwindSafe for Record

impl Send for Record

impl Sync for Record

impl Unpin for Record

impl UnwindSafe for Record

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clone for T where
    T: Clone
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,