Struct trust_dns::client::MemoizeClientHandle
[−]
[src]
#[must_use = "queries can only be sent through a ClientHandle"] pub struct MemoizeClientHandle<H: ClientHandle> { /* fields omitted */ }
Will return 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.
Methods
impl<H> MemoizeClientHandle<H> where H: ClientHandle
[src]
fn new(client: H) -> MemoizeClientHandle<H>
Returns a new handle wrapping the specified client
Trait Implementations
impl<H: Clone + ClientHandle> Clone for MemoizeClientHandle<H>
[src]
fn clone(&self) -> MemoizeClientHandle<H>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<H> ClientHandle for MemoizeClientHandle<H> where H: ClientHandle
[src]
fn send(&self, message: Message) -> Box<Future<Item=Message, Error=ClientError>>
Send a message via the channel in the client Read more
fn query(&self,
name: Name,
query_class: DNSClass,
query_type: RecordType)
-> Box<Future<Item=Message, Error=ClientError>>
name: Name,
query_class: DNSClass,
query_type: RecordType)
-> Box<Future<Item=Message, Error=ClientError>>
A classic DNS query Read more
fn create(&self,
record: Record,
zone_origin: Name)
-> Box<Future<Item=Message, Error=ClientError>>
record: Record,
zone_origin: Name)
-> Box<Future<Item=Message, Error=ClientError>>
Sends a record to create on the server, this will fail if the record exists (atomicity depends on the server) Read more
fn append(&self,
record: Record,
zone_origin: Name,
must_exist: bool)
-> Box<Future<Item=Message, Error=ClientError>>
record: Record,
zone_origin: Name,
must_exist: bool)
-> Box<Future<Item=Message, Error=ClientError>>
Appends a record to an existing rrset, optionally require the rrset to exis (atomicity depends on the server) Read more
fn compare_and_swap(&self,
current: Record,
new: Record,
zone_origin: Name)
-> Box<Future<Item=Message, Error=ClientError>>
current: Record,
new: Record,
zone_origin: Name)
-> Box<Future<Item=Message, Error=ClientError>>
Compares and if it matches, swaps it for the new value (atomicity depends on the server) Read more
fn delete_by_rdata(&self,
record: Record,
zone_origin: Name)
-> Box<Future<Item=Message, Error=ClientError>>
record: Record,
zone_origin: Name)
-> Box<Future<Item=Message, Error=ClientError>>
Deletes a record (by rdata) from an rrset, optionally require the rrset to exist. Read more
fn delete_rrset(&self,
record: Record,
zone_origin: Name)
-> Box<Future<Item=Message, Error=ClientError>>
record: Record,
zone_origin: Name)
-> Box<Future<Item=Message, Error=ClientError>>
Deletes an entire rrset, optionally require the rrset to exist. Read more
fn delete_all(&self,
name_of_records: Name,
zone_origin: Name,
dns_class: DNSClass)
-> Box<Future<Item=Message, Error=ClientError>>
name_of_records: Name,
zone_origin: Name,
dns_class: DNSClass)
-> Box<Future<Item=Message, Error=ClientError>>
Deletes all records at the specified name Read more