pub trait CreateConnection: Sized {
    // Required method
    fn new_connection<P: RuntimeProvider>(
        runtime_provider: &P,
        config: &NameServerConfig,
        options: &ResolverOpts
    ) -> Box<dyn Future<Output = Result<Self, ResolveError>> + Send + Unpin + 'static>;
}
Expand description

Used for creating new connections. We introduce this trait as an intermediate layer for real logic and mock testing. If you are an end user and use GenericConnection, just ignore this trait.

Required Methods§

source

fn new_connection<P: RuntimeProvider>( runtime_provider: &P, config: &NameServerConfig, options: &ResolverOpts ) -> Box<dyn Future<Output = Result<Self, ResolveError>> + Send + Unpin + 'static>

Create a future of Self with the help of runtime provider.

Implementors§