[−][src]Trait srv_rs::resolver::SrvResolver
Represents the ability to act as a SRV resolver.
Associated Types
type Record: SrvRecord
[src]
SRV record representation produced by the resolver.
type Error: Error + 'static
[src]
Errors encountered during SRV resolution.
Required methods
#[must_use]pub fn get_srv_records_unordered<'life0, 'life1, 'async_trait>(
&'life0 self,
srv: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(Vec<Self::Record>, Instant), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
srv: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(Vec<Self::Record>, Instant), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Gets the records corresponding to a srv name without sorting by priority or shuffling based on weight, returning them along with the time they're valid until.
Provided methods
#[must_use]pub fn get_srv_records<'life0, 'life1, 'async_trait>(
&'life0 self,
srv: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(Vec<Self::Record>, Instant), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
srv: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(Vec<Self::Record>, Instant), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Gets the records corresponding to a srv name, sorting by priority and shuffling based on weight, returning them along with the time they're valid until.
pub fn order_srv_records(records: &mut [Self::Record], rng: impl Rng)
[src]
Sorts SRV records by priority and weight per RFC 2782.
Implementations on Foreign Types
impl<C, P> SrvResolver for AsyncResolver<C, P> where
C: DnsHandle,
P: ConnectionProvider<Conn = C>,
[src]
C: DnsHandle,
P: ConnectionProvider<Conn = C>,
type Record = SRV
type Error = ResolveError
pub fn get_srv_records_unordered<'life0, 'life1, 'async_trait>(
&'life0 self,
srv: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(Vec<Self::Record>, Instant), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
srv: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(Vec<Self::Record>, Instant), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Implementors
impl SrvResolver for LibResolv
[src]
type Record = LibResolvSrvRecord
type Error = LibResolvError
pub fn get_srv_records_unordered<'life0, 'life1, 'async_trait>(
&'life0 self,
srv: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(Vec<Self::Record>, Instant), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
srv: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(Vec<Self::Record>, Instant), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,