[−][src]Struct trust_dns::client::SyncClient
The Client is abstracted over either trust_dns::tcp::TcpClientConnection or trust_dns::udp::UdpClientConnection.
Usage of TCP or UDP is up to the user. Some DNS servers disallow TCP in some cases, so if TCP double check if UDP works.
Methods
impl<CC> SyncClient<CC> where
CC: ClientConnection,
[src]
CC: ClientConnection,
pub fn new(conn: CC) -> Self
[src]
Creates a new DNS client with the specified connection type
Arguments
conn
- theClientConnection
to use for all communication
pub fn with_signer(conn: CC, signer: Signer) -> Self
[src]
Creates a new DNS client with the specified connection type and a SIG0 signer.
This is necessary for signed update requests to update trust-dns-server entries.
Arguments
conn
- theClientConnection
to use for all communicationsigner
- signer to use, this needs an associated private key
Trait Implementations
impl<CC> Client for SyncClient<CC> where
CC: ClientConnection,
[src]
CC: ClientConnection,
type Response = CC::Response
The result future that will resolve into a DnsResponse
type Sender = CC::Sender
The actual DNS request sender, aka Connection
type SenderFuture = CC::SenderFuture
A future that resolves into the Sender after connection
type Handle = BasicClientHandle<CC::Response>
A handle to send messages to the Sender
fn new_future(
&self
) -> (ClientFuture<Self::SenderFuture, Self::Sender, Self::Response>, Self::Handle)
[src]
&self
) -> (ClientFuture<Self::SenderFuture, Self::Sender, Self::Response>, Self::Handle)
fn query(
&self,
name: &Name,
query_class: DNSClass,
query_type: RecordType
) -> ClientResult<DnsResponse>
[src]
&self,
name: &Name,
query_class: DNSClass,
query_type: RecordType
) -> ClientResult<DnsResponse>
A classic DNS query, i.e. does not perform any DNSSec operations Read more
fn notify<R>(
&mut self,
name: Name,
query_class: DNSClass,
query_type: RecordType,
rrset: Option<R>
) -> ClientResult<DnsResponse> where
R: Into<RecordSet>,
[src]
&mut self,
name: Name,
query_class: DNSClass,
query_type: RecordType,
rrset: Option<R>
) -> ClientResult<DnsResponse> where
R: Into<RecordSet>,
Sends a NOTIFY message to the remote system Read more
fn create<R>(&self, rrset: R, zone_origin: Name) -> ClientResult<DnsResponse> where
R: Into<RecordSet>,
[src]
R: Into<RecordSet>,
Sends a record to create on the server, this will fail if the record exists (atomicity depends on the server) Read more
fn append<R>(
&self,
rrset: R,
zone_origin: Name,
must_exist: bool
) -> ClientResult<DnsResponse> where
R: Into<RecordSet>,
[src]
&self,
rrset: R,
zone_origin: Name,
must_exist: bool
) -> ClientResult<DnsResponse> where
R: Into<RecordSet>,
Appends a record to an existing rrset, optionally require the rrset to exist (atomicity depends on the server) Read more
fn compare_and_swap<CR, NR>(
&self,
current: CR,
new: NR,
zone_origin: Name
) -> ClientResult<DnsResponse> where
CR: Into<RecordSet>,
NR: Into<RecordSet>,
[src]
&self,
current: CR,
new: NR,
zone_origin: Name
) -> ClientResult<DnsResponse> where
CR: Into<RecordSet>,
NR: Into<RecordSet>,
Compares and if it matches, swaps it for the new value (atomicity depends on the server) Read more
fn delete_by_rdata<R>(
&self,
record: R,
zone_origin: Name
) -> ClientResult<DnsResponse> where
R: Into<RecordSet>,
[src]
&self,
record: R,
zone_origin: Name
) -> ClientResult<DnsResponse> where
R: Into<RecordSet>,
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
) -> ClientResult<DnsResponse>
[src]
&self,
record: Record,
zone_origin: Name
) -> ClientResult<DnsResponse>
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
) -> ClientResult<DnsResponse>
[src]
&self,
name_of_records: Name,
zone_origin: Name,
dns_class: DNSClass
) -> ClientResult<DnsResponse>
Deletes all records at the specified name Read more
Auto Trait Implementations
impl<CC> Send for SyncClient<CC> where
CC: Send,
CC: Send,
impl<CC> Sync for SyncClient<CC> where
CC: Sync,
CC: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,