redis/io/dns.rs
1#[cfg(feature = "aio")]
2use std::net::SocketAddr;
3
4/// An async DNS resovler for resolving redis domain.
5#[cfg(feature = "aio")]
6pub trait AsyncDNSResolver: Send + Sync + 'static {
7 /// Resolves the host and port to a list of `SocketAddr`.
8 fn resolve<'a, 'b: 'a>(
9 &'a self,
10 host: &'b str,
11 port: u16,
12 ) -> crate::RedisFuture<'a, Box<dyn Iterator<Item = SocketAddr> + Send + 'a>>;
13}