[][src]Struct domain_resolv::lookup::host::FoundHosts

pub struct FoundHosts { /* fields omitted */ }

The value returned by a successful host lookup.

You can use the iter() method to get an iterator over the IP addresses or port_iter() to get an iterator over socket addresses with the given port.

The canonical_name() method returns the canonical name of the host for which the addresses were found.

Methods

impl FoundHosts[src]

pub fn new(canonical: Dname, addrs: Vec<IpAddr>) -> Self[src]

pub fn qname(&self) -> &Dname[src]

Returns a reference to the domain name that was queried.

pub fn canonical_name(&self) -> &Dname[src]

Returns a reference to the canonical name for the host.

Important traits for FoundHostsIter<'a>
pub fn iter(&self) -> FoundHostsIter[src]

Returns an iterator over the IP addresses returned by the lookup.

Important traits for FoundHostsSocketIter<'a>
pub fn port_iter(&self, port: u16) -> FoundHostsSocketIter[src]

Returns an iterator over socket addresses gained from the lookup.

The socket addresses are gained by combining the IP addresses with port. The returned iterator implements ToSocketAddrs and thus can be used where std::net wants addresses right away.

Trait Implementations

impl Clone for FoundHosts[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for FoundHosts[src]

Auto Trait Implementations

impl Send for FoundHosts

impl Sync for FoundHosts

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> Erased for T