[][src]Struct trust_dns_resolver::Hosts

pub struct Hosts { /* fields omitted */ }

Configuration for the local hosts file

Methods

impl Hosts[src]

pub fn new() -> Hosts[src]

Creates a new configuration from the system hosts file, only works for Windows and Unix-like OSes, will return empty configuration on others

pub fn lookup_static_host(&self, query: &Query) -> Option<Lookup>[src]

lookup_static_host looks up the addresses for the given host from the system hosts file.

pub fn insert(&mut self, name: Name, record_type: RecordType, lookup: Lookup)[src]

Insert a new Lookup for the associated Name and RecordType

Trait Implementations

impl Default for Hosts[src]

impl Debug for Hosts[src]

Auto Trait Implementations

impl Send for Hosts

impl Sync for Hosts

Blanket Implementations

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

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T