Add getters for resolver config and options (#2093)

This commit is contained in:
Liam Gray
2023-11-20 12:37:06 +00:00
committed by GitHub
parent 2b1fe9e007
commit b0b6957b58
2 changed files with 20 additions and 0 deletions

View File

@@ -175,6 +175,16 @@ impl<R: ConnectionProvider> AsyncResolver<R> {
pub fn clear_cache(&self) {
self.client_cache.clear_cache();
}
/// Read the config for this resolver.
pub fn config(&self) -> &ResolverConfig {
&self.config
}
/// Read the options for this resolver.
pub fn options(&self) -> &ResolverOpts {
&self.options
}
}
impl<P: ConnectionProvider> AsyncResolver<P> {