Struct resolve::hosts::HostTable
[−]
[src]
pub struct HostTable {
pub hosts: Vec<Host>,
}Represents a host table, consisting of addresses mapped to names.
Fields
hosts: Vec<Host>
Contained hosts
Methods
impl HostTable[src]
fn find_address(&self, name: &str) -> Option<IpAddr>
Returns the address for the first host matching the given name.
If no match is found, None is returned.
fn find_name(&self, addr: IpAddr) -> Option<&str>
Returns the canonical name for the first host matching the given address.
If no match is found, None is returned.
fn find_host_by_address(&self, addr: IpAddr) -> Option<&Host>
Returns the first host matching the given address.
If no match is found, None is returned.
fn find_host_by_name(&self, name: &str) -> Option<&Host>
Returns the first host matching the given address.
If no match is found, None is returned.
Trait Implementations
impl Clone for HostTable[src]
fn clone(&self) -> HostTable
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