bump version to 0.19.5

This commit is contained in:
Benjamin Fry
2020-04-27 09:49:03 -07:00
parent 5767c13a38
commit 30e0f302a0
16 changed files with 149 additions and 147 deletions

View File

@@ -74,34 +74,36 @@ pub type TokioAsyncResolver = AsyncResolver<TokioConnection, TokioConnectionProv
macro_rules! lookup_fn {
($p:ident, $l:ty, $r:path) => {
/// Performs a lookup for the associated type.
///
/// *hint* queries that end with a '.' are fully qualified names and are cheaper lookups
///
/// # Arguments
///
/// * `query` - a string which parses to a domain name, failure to parse will return an error
pub async fn $p<N: IntoName>(&self, query: N) -> Result<$l, ResolveError> {
let name = match query.into_name() {
Ok(name) => name,
Err(err) => {
return Err(err.into());
/// Performs a lookup for the associated type.
///
/// *hint* queries that end with a '.' are fully qualified names and are cheaper lookups
///
/// # Arguments
///
/// * `query` - a string which parses to a domain name, failure to parse will return an error
pub async fn $p<N: IntoName>(&self, query: N) -> Result<$l, ResolveError> {
let name = match query.into_name() {
Ok(name) => name,
Err(err) => {
return Err(err.into());
}
};
self.inner_lookup(name, $r, DnsRequestOptions::default())
.await
}
};
self.inner_lookup(name, $r, DnsRequestOptions::default()).await
}
};
($p:ident, $l:ty, $r:path, $t:ty) => {
/// Performs a lookup for the associated type.
///
/// # Arguments
///
/// * `query` - a type which can be converted to `Name` via `From`.
pub async fn $p(&self, query: $t) -> Result<$l, ResolveError> {
let name = Name::from(query);
self.inner_lookup(name, $r, DnsRequestOptions::default()).await
}
/// Performs a lookup for the associated type.
///
/// # Arguments
///
/// * `query` - a type which can be converted to `Name` via `From`.
pub async fn $p(&self, query: $t) -> Result<$l, ResolveError> {
let name = Name::from(query);
self.inner_lookup(name, $r, DnsRequestOptions::default())
.await
}
};
}