Struct abstract_ns::MemResolver [] [src]

pub struct MemResolver { /* fields omitted */ }

A stub resolver that resolves names from in-memory hash table

While this resolver is mostly useful in tests, you can also use it inside a chain of resolvers to resolve localhost or other built-in names.

Methods

impl MemResolver
[src]

Create new empty stub resolver

You should add some hosts to make it useful

Add a single host to resolve

Note: only name without port number should be specified as name

Check if name is in resolver

Trait Implementations

impl Resolver for MemResolver
[src]

Resolve a name to an address once

Resolve a name and subscribe to the updates Read more