Trait DnsServiceBindingResolver
pub trait DnsServiceBindingResolver:
Sized
+ Send
+ Sync
+ 'static {
type Error: Into<Box<dyn Error + Send + Sync>> + Send + 'static;
// Required methods
fn lookup_svcb(
&self,
domain: Domain,
) -> impl Stream<Item = Result<ServiceBinding, Self::Error>> + Send;
fn lookup_https(
&self,
domain: Domain,
) -> impl Stream<Item = Result<ServiceBinding, Self::Error>> + Send;
// Provided method
fn into_box_dns_service_binding_resolver(
self,
) -> BoxDnsServiceBindingResolver { ... }
}Available on crate features
dns and std only.Expand description
A resolver of domains into SVCB and HTTPS Service Binding records.
Required Associated Types§
Required Methods§
fn lookup_svcb(
&self,
domain: Domain,
) -> impl Stream<Item = Result<ServiceBinding, Self::Error>> + Send
fn lookup_svcb( &self, domain: Domain, ) -> impl Stream<Item = Result<ServiceBinding, Self::Error>> + Send
Resolve the complete SVCB RRset for the given domain.
Implementations must validate the complete RRset before yielding any records. If one record is malformed, the stream must yield an error and no records from that RRset, as required by RFC 9460 section 2.2.
fn lookup_https(
&self,
domain: Domain,
) -> impl Stream<Item = Result<ServiceBinding, Self::Error>> + Send
fn lookup_https( &self, domain: Domain, ) -> impl Stream<Item = Result<ServiceBinding, Self::Error>> + Send
Resolve the complete HTTPS RRset for the given domain.
Implementations must validate the complete RRset before yielding any records. If one record is malformed, the stream must yield an error and no records from that RRset, as required by RFC 9460 section 2.2.
Provided Methods§
fn into_box_dns_service_binding_resolver(self) -> BoxDnsServiceBindingResolver
fn into_box_dns_service_binding_resolver(self) -> BoxDnsServiceBindingResolver
Box this resolver to allow dynamic dispatch.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".