Struct LinuxDnsResolver
#[non_exhaustive]pub struct LinuxDnsResolver { /* private fields */ }dns and std only.Implementations§
§impl LinuxDnsResolver
impl LinuxDnsResolver
pub fn new() -> LinuxDnsResolver
pub const fn timeout(&self) -> Duration
pub const fn cache_ttl(&self) -> Duration
pub const fn negative_cache_ttl(&self) -> Duration
pub const fn cache_capacity(&self) -> u64
pub const fn response_buffer_size(&self) -> usize
pub fn native_max_concurrency(&self) -> Option<usize>
pub fn native_burst_limit(&self) -> Option<usize>
pub fn native_burst_window(&self) -> Duration
pub fn systemd_resolved_enabled(&self) -> bool
pub fn with_timeout(self, timeout: Duration) -> LinuxDnsResolver
pub fn with_timeout(self, timeout: Duration) -> LinuxDnsResolver
Set the timeout for each DNS backend attempt.
See [LinuxDnsResolverBuilder::timeout] for fallback latency
semantics. The cache stays shared with clones; clones made before
this call no longer share lookups with this resolver.
pub fn set_timeout(&mut self, timeout: Duration) -> &mut LinuxDnsResolver
pub fn set_timeout(&mut self, timeout: Duration) -> &mut LinuxDnsResolver
Set the timeout for each DNS backend attempt.
See [LinuxDnsResolverBuilder::timeout] for fallback latency
semantics. The cache stays shared with clones; clones made before
this call no longer share lookups with this resolver.
pub fn maybe_with_native_max_concurrency(
self,
max: Option<usize>,
) -> LinuxDnsResolver
pub fn maybe_with_native_max_concurrency( self, max: Option<usize>, ) -> LinuxDnsResolver
Set the maximum concurrent native (libc) lookups.
See [LinuxDnsResolverBuilder::native_max_concurrency]. Clones
made before this call keep their own bounds.
pub fn maybe_set_native_max_concurrency(
&mut self,
max: Option<usize>,
) -> &mut LinuxDnsResolver
pub fn maybe_set_native_max_concurrency( &mut self, max: Option<usize>, ) -> &mut LinuxDnsResolver
Set the maximum concurrent native (libc) lookups.
See [LinuxDnsResolverBuilder::native_max_concurrency]. Clones
made before this call keep their own bounds.
pub fn with_native_max_concurrency(self, max: usize) -> LinuxDnsResolver
pub fn with_native_max_concurrency(self, max: usize) -> LinuxDnsResolver
Set the maximum concurrent native (libc) lookups.
See [LinuxDnsResolverBuilder::native_max_concurrency]. Clones
made before this call keep their own bounds.
pub fn set_native_max_concurrency(
&mut self,
max: usize,
) -> &mut LinuxDnsResolver
pub fn set_native_max_concurrency( &mut self, max: usize, ) -> &mut LinuxDnsResolver
Set the maximum concurrent native (libc) lookups.
See [LinuxDnsResolverBuilder::native_max_concurrency]. Clones
made before this call keep their own bounds.
pub fn without_native_max_concurrency(self) -> LinuxDnsResolver
pub fn without_native_max_concurrency(self) -> LinuxDnsResolver
Set the maximum concurrent native (libc) lookups.
See [LinuxDnsResolverBuilder::native_max_concurrency]. Clones
made before this call keep their own bounds.
pub fn unset_native_max_concurrency(&mut self) -> &mut LinuxDnsResolver
pub fn unset_native_max_concurrency(&mut self) -> &mut LinuxDnsResolver
Set the maximum concurrent native (libc) lookups.
See [LinuxDnsResolverBuilder::native_max_concurrency]. Clones
made before this call keep their own bounds.
pub fn maybe_with_native_burst_limit(
self,
max: Option<usize>,
) -> LinuxDnsResolver
pub fn maybe_with_native_burst_limit( self, max: Option<usize>, ) -> LinuxDnsResolver
Set the maximum unanswered native lookups per burst window.
See [LinuxDnsResolverBuilder::native_burst_limit]. Clones made
before this call keep their own bounds.
pub fn maybe_set_native_burst_limit(
&mut self,
max: Option<usize>,
) -> &mut LinuxDnsResolver
pub fn maybe_set_native_burst_limit( &mut self, max: Option<usize>, ) -> &mut LinuxDnsResolver
Set the maximum unanswered native lookups per burst window.
See [LinuxDnsResolverBuilder::native_burst_limit]. Clones made
before this call keep their own bounds.
pub fn with_native_burst_limit(self, max: usize) -> LinuxDnsResolver
pub fn with_native_burst_limit(self, max: usize) -> LinuxDnsResolver
Set the maximum unanswered native lookups per burst window.
See [LinuxDnsResolverBuilder::native_burst_limit]. Clones made
before this call keep their own bounds.
pub fn set_native_burst_limit(&mut self, max: usize) -> &mut LinuxDnsResolver
pub fn set_native_burst_limit(&mut self, max: usize) -> &mut LinuxDnsResolver
Set the maximum unanswered native lookups per burst window.
See [LinuxDnsResolverBuilder::native_burst_limit]. Clones made
before this call keep their own bounds.
pub fn without_native_burst_limit(self) -> LinuxDnsResolver
pub fn without_native_burst_limit(self) -> LinuxDnsResolver
Set the maximum unanswered native lookups per burst window.
See [LinuxDnsResolverBuilder::native_burst_limit]. Clones made
before this call keep their own bounds.
pub fn unset_native_burst_limit(&mut self) -> &mut LinuxDnsResolver
pub fn unset_native_burst_limit(&mut self) -> &mut LinuxDnsResolver
Set the maximum unanswered native lookups per burst window.
See [LinuxDnsResolverBuilder::native_burst_limit]. Clones made
before this call keep their own bounds.
pub fn with_native_burst_window(self, window: Duration) -> LinuxDnsResolver
pub fn with_native_burst_window(self, window: Duration) -> LinuxDnsResolver
Set the native burst window.
See [LinuxDnsResolverBuilder::native_burst_window]. Clones made
before this call keep their own bounds.
pub fn set_native_burst_window(
&mut self,
window: Duration,
) -> &mut LinuxDnsResolver
pub fn set_native_burst_window( &mut self, window: Duration, ) -> &mut LinuxDnsResolver
Set the native burst window.
See [LinuxDnsResolverBuilder::native_burst_window]. Clones made
before this call keep their own bounds.
pub fn builder() -> LinuxDnsResolverBuilder
Trait Implementations§
§impl Clone for LinuxDnsResolver
impl Clone for LinuxDnsResolver
§fn clone(&self) -> LinuxDnsResolver
fn clone(&self) -> LinuxDnsResolver
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for LinuxDnsResolver
impl Debug for LinuxDnsResolver
§impl Default for LinuxDnsResolver
impl Default for LinuxDnsResolver
§fn default() -> LinuxDnsResolver
fn default() -> LinuxDnsResolver
§impl DnsAddressResolver for LinuxDnsResolver
impl DnsAddressResolver for LinuxDnsResolver
§fn lookup_ipv4(
&self,
domain: Domain,
) -> impl Stream<Item = Result<Ipv4Addr, <LinuxDnsResolver as DnsAddressResolver>::Error>> + Send
fn lookup_ipv4( &self, domain: Domain, ) -> impl Stream<Item = Result<Ipv4Addr, <LinuxDnsResolver as DnsAddressResolver>::Error>> + Send
§fn lookup_ipv6(
&self,
domain: Domain,
) -> impl Stream<Item = Result<Ipv6Addr, <LinuxDnsResolver as DnsAddressResolver>::Error>> + Send
fn lookup_ipv6( &self, domain: Domain, ) -> impl Stream<Item = Result<Ipv6Addr, <LinuxDnsResolver as DnsAddressResolver>::Error>> + Send
§fn lookup_ipv4_first(
&self,
domain: Domain,
) -> impl Future<Output = Option<Result<Ipv4Addr, Self::Error>>> + Send
fn lookup_ipv4_first( &self, domain: Domain, ) -> impl Future<Output = Option<Result<Ipv4Addr, Self::Error>>> + Send
§fn lookup_ipv4_rand(
&self,
domain: Domain,
) -> impl Future<Output = Option<Result<Ipv4Addr, Self::Error>>> + Send
fn lookup_ipv4_rand( &self, domain: Domain, ) -> impl Future<Output = Option<Result<Ipv4Addr, Self::Error>>> + Send
§fn lookup_ipv6_first(
&self,
domain: Domain,
) -> impl Future<Output = Option<Result<Ipv6Addr, Self::Error>>> + Send
fn lookup_ipv6_first( &self, domain: Domain, ) -> impl Future<Output = Option<Result<Ipv6Addr, Self::Error>>> + Send
§fn lookup_ipv6_rand(
&self,
domain: Domain,
) -> impl Future<Output = Option<Result<Ipv6Addr, Self::Error>>> + Send
fn lookup_ipv6_rand( &self, domain: Domain, ) -> impl Future<Output = Option<Result<Ipv6Addr, Self::Error>>> + Send
§fn into_box_dns_address_resolver(self) -> BoxDnsAddressResolver
fn into_box_dns_address_resolver(self) -> BoxDnsAddressResolver
§impl DnsCnameResolver for LinuxDnsResolver
impl DnsCnameResolver for LinuxDnsResolver
§fn lookup_cname(
&self,
domain: Domain,
) -> impl Stream<Item = Result<Name, <LinuxDnsResolver as DnsCnameResolver>::Error>> + Send
fn lookup_cname( &self, domain: Domain, ) -> impl Stream<Item = Result<Name, <LinuxDnsResolver as DnsCnameResolver>::Error>> + Send
§fn into_box_dns_cname_resolver(self) -> BoxDnsCnameResolver
fn into_box_dns_cname_resolver(self) -> BoxDnsCnameResolver
§impl DnsResolver for LinuxDnsResolver
impl DnsResolver for LinuxDnsResolver
§fn into_box_dns_resolver(self) -> BoxDnsResolverwhere
Self: Sized,
fn into_box_dns_resolver(self) -> BoxDnsResolverwhere
Self: Sized,
§impl DnsServiceBindingResolver for LinuxDnsResolver
impl DnsServiceBindingResolver for LinuxDnsResolver
§fn lookup_svcb(
&self,
domain: Domain,
) -> impl Stream<Item = Result<ServiceBindingRecord, Box<dyn Error + Send + Sync>>> + Send
fn lookup_svcb( &self, domain: Domain, ) -> impl Stream<Item = Result<ServiceBindingRecord, Box<dyn Error + Send + Sync>>> + Send
§fn lookup_https(
&self,
domain: Domain,
) -> impl Stream<Item = Result<ServiceBindingRecord, Box<dyn Error + Send + Sync>>> + Send
fn lookup_https( &self, domain: Domain, ) -> impl Stream<Item = Result<ServiceBindingRecord, Box<dyn Error + Send + Sync>>> + Send
§fn into_box_dns_service_binding_resolver(self) -> BoxDnsServiceBindingResolver
fn into_box_dns_service_binding_resolver(self) -> BoxDnsServiceBindingResolver
§impl DnsTxtResolver for LinuxDnsResolver
impl DnsTxtResolver for LinuxDnsResolver
§fn lookup_txt(
&self,
domain: Domain,
) -> impl Stream<Item = Result<Txt, <LinuxDnsResolver as DnsTxtResolver>::Error>> + Send
fn lookup_txt( &self, domain: Domain, ) -> impl Stream<Item = Result<Txt, <LinuxDnsResolver as DnsTxtResolver>::Error>> + Send
§fn into_box_dns_txt_resolver(self) -> BoxDnsTxtResolver
fn into_box_dns_txt_resolver(self) -> BoxDnsTxtResolver
Auto Trait Implementations§
impl !RefUnwindSafe for LinuxDnsResolver
impl !UnwindSafe for LinuxDnsResolver
impl Forget for LinuxDnsResolver
impl Freeze for LinuxDnsResolverwhere
*const ArcInner<Semaphore> is !null: Freeze,
PhantomData<ArcInner<Semaphore>>: Freeze,
*const ArcInner<Burst> is !null: Freeze,
PhantomData<ArcInner<Burst>>: Freeze,
*const ArcInner<LinuxDnsCache> is !null: Freeze,
PhantomData<ArcInner<LinuxDnsCache>>: Freeze,
*const ArcInner<Shards<CacheKey>> is !null: Freeze,
PhantomData<ArcInner<Shards<CacheKey>>>: Freeze,
*const ArcInner<SystemdResolved> is !null: Freeze,
PhantomData<ArcInner<SystemdResolved>>: Freeze,
impl Move for LinuxDnsResolver
impl Send for LinuxDnsResolver
impl Sync for LinuxDnsResolver
impl Unpin for LinuxDnsResolver
impl UnsafeUnpin for LinuxDnsResolverwhere
*const ArcInner<Semaphore> is !null: UnsafeUnpin,
PhantomData<ArcInner<Semaphore>>: UnsafeUnpin,
*const ArcInner<Burst> is !null: UnsafeUnpin,
PhantomData<ArcInner<Burst>>: UnsafeUnpin,
*const ArcInner<LinuxDnsCache> is !null: UnsafeUnpin,
PhantomData<ArcInner<LinuxDnsCache>>: UnsafeUnpin,
*const ArcInner<Shards<CacheKey>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shards<CacheKey>>>: UnsafeUnpin,
*const ArcInner<SystemdResolved> is !null: UnsafeUnpin,
PhantomData<ArcInner<SystemdResolved>>: UnsafeUnpin,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<R> HappyEyeballAddressResolverExt for Rwhere
R: DnsAddressResolver,
impl<R> HappyEyeballAddressResolverExt for Rwhere
R: DnsAddressResolver,
§fn happy_eyeballs_resolver(
&self,
host: impl Into<Host>,
) -> HappyEyeballAddressResolver<'_, R>
fn happy_eyeballs_resolver( &self, host: impl Into<Host>, ) -> HappyEyeballAddressResolver<'_, R>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more