pub struct MemoizeClientHandle<H: ClientHandle> { /* private fields */ }Expand description
A ClientHandle for memoized (cached) responses to queries.
This wraps a ClientHandle, changing the implementation send() to store the response against
the Message.Query that was sent. This should reduce network traffic especially during things
like DNSSEC validation. Warning this will currently cache for the life of the Client.
Implementations§
Source§impl<H> MemoizeClientHandle<H>where
H: ClientHandle,
impl<H> MemoizeClientHandle<H>where
H: ClientHandle,
Trait Implementations§
Source§impl<H: Clone + ClientHandle> Clone for MemoizeClientHandle<H>
impl<H: Clone + ClientHandle> Clone for MemoizeClientHandle<H>
Source§fn clone(&self) -> MemoizeClientHandle<H>
fn clone(&self) -> MemoizeClientHandle<H>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<H> DnsHandle for MemoizeClientHandle<H>where
H: ClientHandle,
impl<H> DnsHandle for MemoizeClientHandle<H>where
H: ClientHandle,
Source§type Response = Pin<Box<dyn Stream<Item = Result<DnsResponse, ProtoError>> + Send>>
type Response = Pin<Box<dyn Stream<Item = Result<DnsResponse, ProtoError>> + Send>>
The associated response from the response stream, this should resolve to the Response messages
Source§type Error = ProtoError
type Error = ProtoError
Error of the response, generally this will be
ProtoErrorSource§fn send<R: Into<DnsRequest>>(&mut self, request: R) -> Self::Response
fn send<R: Into<DnsRequest>>(&mut self, request: R) -> Self::Response
Send a message via the channel in the client Read more
Source§fn is_verifying_dnssec(&self) -> bool
fn is_verifying_dnssec(&self) -> bool
Only returns true if and only if this DNS handle is validating DNSSEC. Read more
Source§fn is_using_edns(&self) -> bool
fn is_using_edns(&self) -> bool
Allow for disabling EDNS
Auto Trait Implementations§
impl<H> Freeze for MemoizeClientHandle<H>where
H: Freeze,
impl<H> !RefUnwindSafe for MemoizeClientHandle<H>
impl<H> Send for MemoizeClientHandle<H>
impl<H> Sync for MemoizeClientHandle<H>
impl<H> Unpin for MemoizeClientHandle<H>
impl<H> !UnwindSafe for MemoizeClientHandle<H>
Blanket Implementations§
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
Source§impl<T> ClientHandle for Twhere
T: DnsHandle<Error = ProtoError>,
impl<T> ClientHandle for Twhere
T: DnsHandle<Error = ProtoError>,
Source§fn query(
&mut self,
name: Name,
query_class: DNSClass,
query_type: RecordType,
) -> ClientResponse<<Self as DnsHandle>::Response>
fn query( &mut self, name: Name, query_class: DNSClass, query_type: RecordType, ) -> ClientResponse<<Self as DnsHandle>::Response>
A classic DNS query Read more
Source§fn notify<R>(
&mut self,
name: Name,
query_class: DNSClass,
query_type: RecordType,
rrset: Option<R>,
) -> ClientResponse<<Self as DnsHandle>::Response>
fn notify<R>( &mut self, name: Name, query_class: DNSClass, query_type: RecordType, rrset: Option<R>, ) -> ClientResponse<<Self as DnsHandle>::Response>
Sends a NOTIFY message to the remote system Read more
Source§fn create<R>(
&mut self,
rrset: R,
zone_origin: Name,
) -> ClientResponse<<Self as DnsHandle>::Response>
fn create<R>( &mut self, rrset: R, zone_origin: Name, ) -> ClientResponse<<Self as DnsHandle>::Response>
Sends a record to create on the server, this will fail if the record exists (atomicity
depends on the server) Read more
Source§fn append<R>(
&mut self,
rrset: R,
zone_origin: Name,
must_exist: bool,
) -> ClientResponse<<Self as DnsHandle>::Response>
fn append<R>( &mut self, rrset: R, zone_origin: Name, must_exist: bool, ) -> ClientResponse<<Self as DnsHandle>::Response>
Appends a record to an existing rrset, optionally require the rrset to exist (atomicity
depends on the server) Read more
Source§fn compare_and_swap<C, N>(
&mut self,
current: C,
new: N,
zone_origin: Name,
) -> ClientResponse<<Self as DnsHandle>::Response>
fn compare_and_swap<C, N>( &mut self, current: C, new: N, zone_origin: Name, ) -> ClientResponse<<Self as DnsHandle>::Response>
Compares and if it matches, swaps it for the new value (atomicity depends on the server) Read more
Source§fn delete_by_rdata<R>(
&mut self,
rrset: R,
zone_origin: Name,
) -> ClientResponse<<Self as DnsHandle>::Response>
fn delete_by_rdata<R>( &mut self, rrset: R, zone_origin: Name, ) -> ClientResponse<<Self as DnsHandle>::Response>
Deletes a record (by rdata) from an rrset, optionally require the rrset to exist. Read more
Source§fn delete_rrset(
&mut self,
record: Record,
zone_origin: Name,
) -> ClientResponse<<Self as DnsHandle>::Response>
fn delete_rrset( &mut self, record: Record, zone_origin: Name, ) -> ClientResponse<<Self as DnsHandle>::Response>
Deletes an entire rrset, optionally require the rrset to exist. Read more
Source§fn delete_all(
&mut self,
name_of_records: Name,
zone_origin: Name,
dns_class: DNSClass,
) -> ClientResponse<<Self as DnsHandle>::Response>
fn delete_all( &mut self, name_of_records: Name, zone_origin: Name, dns_class: DNSClass, ) -> ClientResponse<<Self as DnsHandle>::Response>
Deletes all records at the specified name Read more
Source§fn zone_transfer(
&mut self,
zone_origin: Name,
last_soa: Option<SOA>,
) -> ClientStreamXfr<<Self as DnsHandle>::Response>
fn zone_transfer( &mut self, zone_origin: Name, last_soa: Option<SOA>, ) -> ClientStreamXfr<<Self as DnsHandle>::Response>
Download all records from a zone, or all records modified since given SOA was observed.
The request will either be a AXFR Query (ask for full zone transfer) if a SOA was not
provided, or a IXFR Query (incremental zone transfer) if a SOA was provided. Read more