Struct resolv::Resolver [] [src]

pub struct Resolver {
    // some fields omitted
}

Methods

impl Resolver
[src]

fn new() -> Option<Resolver>

fn option(&mut self, option: ResolverOption, value: bool)

Set or unset an option

fn search(&mut self, name: &[u8], class: Class, typ: RecordType) -> Result<ResponseError>

Lookup the record. Applies the search algorithm to the domain name given (if not fully qualified, it completes it using rules specified in resolv.conf search entries). In addition, this also searches your hosts file. Applies recursion if available and not turned off (it is on by default).

This is the highest level resolver routine, and is the one called by gethostbyname.

fn query(&mut self, dname: &[u8], class: Class, typ: RecordType) -> Result<ResponseError>

Lookup the record. Does not apply the search algorithm, so dname must be a complete domain name, and only DNS will be consulted (not your hosts file). Applies recursion if available and not turned off (it is on by default).