pub struct QualiaDnsResolver<'a> {
pub config: ResolverConfig<'a>,
}Expand description
Zero-heap DNS resolver executing over raw UDP sockets on native platforms.
Fields§
§config: ResolverConfig<'a>Implementations§
Source§impl<'a> QualiaDnsResolver<'a>
impl<'a> QualiaDnsResolver<'a>
Sourcepub fn new(config: ResolverConfig<'a>) -> Self
pub fn new(config: ResolverConfig<'a>) -> Self
Creates a default QualiaDnsResolver.
Sourcepub fn query_into(
&self,
domain: &str,
qtype: DnsType,
out_quins: &mut [NQuin],
) -> Result<usize, &'static str>
pub fn query_into( &self, domain: &str, qtype: DnsType, out_quins: &mut [NQuin], ) -> Result<usize, &'static str>
Perform a raw UDP DNS query and parse the responses directly into out_quins.
Returns the number of quins written into out_quins. Zero heap allocation.
Sourcepub fn parse_response_into(
&self,
packet: &[u8],
expected_id: u16,
out_quins: &mut [NQuin],
) -> Result<usize, &'static str>
pub fn parse_response_into( &self, packet: &[u8], expected_id: u16, out_quins: &mut [NQuin], ) -> Result<usize, &'static str>
Parse a raw DNS response packet into caller-supplied out_quins.
Zero heap allocation.
Sourcepub fn resolve_ipv4(&self, domain: &str) -> Result<[u8; 4], &'static str>
pub fn resolve_ipv4(&self, domain: &str) -> Result<[u8; 4], &'static str>
Resolve an IPv4 A record directly.
Sourcepub fn resolve_ipv6(&self, domain: &str) -> Result<[u8; 16], &'static str>
pub fn resolve_ipv6(&self, domain: &str) -> Result<[u8; 16], &'static str>
Resolve an IPv6 AAAA record directly.
Sourcepub fn resolve_ip(&self, domain: &str) -> Result<IpAddr, &'static str>
pub fn resolve_ip(&self, domain: &str) -> Result<IpAddr, &'static str>
Dual-stack IP resolution: queries AAAA first, falls back to A.
Sourcepub fn resolve_cname(&self, domain: &str) -> Result<(u64, u32), &'static str>
pub fn resolve_cname(&self, domain: &str) -> Result<(u64, u32), &'static str>
Resolve a CNAME record returning target hash and TTL.
Sourcepub fn query_and_cache<const N: usize>(
&self,
domain: &str,
qtype: DnsType,
ring: &mut DnsCacheRing<N>,
current_clock: u32,
) -> Result<usize, &'static str>
pub fn query_and_cache<const N: usize>( &self, domain: &str, qtype: DnsType, ring: &mut DnsCacheRing<N>, current_clock: u32, ) -> Result<usize, &'static str>
Resolve and populate into a zero-heap cache ring buffer.
Sourcepub fn resolve_sdn_front_door<'b>(
&self,
domain: &'b str,
txt_storage: &'b mut [u8; 512],
) -> Result<SdnFrontDoorView<'b>, &'static str>
pub fn resolve_sdn_front_door<'b>( &self, domain: &'b str, txt_storage: &'b mut [u8; 512], ) -> Result<SdnFrontDoorView<'b>, &'static str>
Resolve a _qdp.<domain> Front-Door record into a borrowed view.
Auto Trait Implementations§
impl<'a> Freeze for QualiaDnsResolver<'a>
impl<'a> RefUnwindSafe for QualiaDnsResolver<'a>
impl<'a> Send for QualiaDnsResolver<'a>
impl<'a> Sync for QualiaDnsResolver<'a>
impl<'a> Unpin for QualiaDnsResolver<'a>
impl<'a> UnsafeUnpin for QualiaDnsResolver<'a>
impl<'a> UnwindSafe for QualiaDnsResolver<'a>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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