Skip to main content

Resolver

Trait Resolver 

Source
pub trait Resolver:
    Clone
    + Send
    + Sync
    + 'static {
    // Required method
    fn resolve(
        &self,
        host: &str,
    ) -> impl Future<Output = Result<Vec<IpAddr>, Error>> + Send;
}
Expand description

Interface for DNS resolution.

Required Methods§

Source

fn resolve( &self, host: &str, ) -> impl Future<Output = Result<Vec<IpAddr>, Error>> + Send

Resolve a hostname to IP addresses.

Returns a list of IP addresses that the hostname resolves to.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Resolver for commonware_runtime::deterministic::Context

Source§

impl Resolver for commonware_runtime::tokio::Context

Source§

impl<C> Resolver for Cell<C>
where C: Resolver,

Available on neither commonware_stability_GAMMA nor commonware_stability_DELTA nor commonware_stability_EPSILON nor commonware_stability_RESERVED.