[−][src]Struct domain_resolv::lookup::host::FoundHosts
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(&self) -> 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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,