Struct trust_dns::client::SyncClient
source · pub struct SyncClient<CC> { /* private fields */ }
Expand description
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.
Implementations
sourceimpl<CC> SyncClient<CC>where
CC: ClientConnection,
impl<CC> SyncClient<CC>where
CC: ClientConnection,
sourcepub fn new(conn: CC) -> Self
pub fn new(conn: CC) -> Self
Creates a new DNS client with the specified connection type
Arguments
conn
- theClientConnection
to use for all communication
sourcepub fn with_signer(conn: CC, signer: Signer) -> Self
pub fn with_signer(conn: CC, signer: Signer) -> Self
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
sourceimpl<CC> Client for SyncClient<CC>where
CC: ClientConnection,
impl<CC> Client for SyncClient<CC>where
CC: ClientConnection,
type Response = <CC as ClientConnection>::Response
type Response = <CC as ClientConnection>::Response
The result future that will resolve into a DnsResponse
type Sender = <CC as ClientConnection>::Sender
type Sender = <CC as ClientConnection>::Sender
The actual DNS request sender, aka Connection
type SenderFuture = <CC as ClientConnection>::SenderFuture
type SenderFuture = <CC as ClientConnection>::SenderFuture
A future that resolves into the Sender after connection
type Handle = BasicClientHandle<<CC as ClientConnection>::Response>
type Handle = BasicClientHandle<<CC as ClientConnection>::Response>
A handle to send messages to the Sender
sourcefn new_future(
&self
) -> (ClientFuture<Self::SenderFuture, Self::Sender, Self::Response>, Self::Handle)
fn new_future(
&self
) -> (ClientFuture<Self::SenderFuture, Self::Sender, Self::Response>, Self::Handle)
Return the inner Futures items Read more
sourcefn query(
&self,
name: &Name,
query_class: DNSClass,
query_type: RecordType
) -> ClientResult<DnsResponse>
fn query(
&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
sourcefn notify<R>(
&mut self,
name: Name,
query_class: DNSClass,
query_type: RecordType,
rrset: Option<R>
) -> ClientResult<DnsResponse>where
R: IntoRecordSet,
fn notify<R>(
&mut self,
name: Name,
query_class: DNSClass,
query_type: RecordType,
rrset: Option<R>
) -> ClientResult<DnsResponse>where
R: IntoRecordSet,
Sends a NOTIFY message to the remote system Read more
sourcefn create<R>(&self, rrset: R, zone_origin: Name) -> ClientResult<DnsResponse>where
R: IntoRecordSet,
fn create<R>(&self, rrset: R, zone_origin: Name) -> ClientResult<DnsResponse>where
R: IntoRecordSet,
Sends a record to create on the server, this will fail if the record exists (atomicity
depends on the server) Read more
sourcefn append<R>(
&self,
rrset: R,
zone_origin: Name,
must_exist: bool
) -> ClientResult<DnsResponse>where
R: IntoRecordSet,
fn append<R>(
&self,
rrset: R,
zone_origin: Name,
must_exist: bool
) -> ClientResult<DnsResponse>where
R: IntoRecordSet,
Appends a record to an existing rrset, optionally require the rrset to exist (atomicity
depends on the server) Read more
sourcefn compare_and_swap<CR, NR>(
&self,
current: CR,
new: NR,
zone_origin: Name
) -> ClientResult<DnsResponse>where
CR: IntoRecordSet,
NR: IntoRecordSet,
fn compare_and_swap<CR, NR>(
&self,
current: CR,
new: NR,
zone_origin: Name
) -> ClientResult<DnsResponse>where
CR: IntoRecordSet,
NR: IntoRecordSet,
Compares and if it matches, swaps it for the new value (atomicity depends on the server) Read more
sourcefn delete_by_rdata<R>(
&self,
record: R,
zone_origin: Name
) -> ClientResult<DnsResponse>where
R: IntoRecordSet,
fn delete_by_rdata<R>(
&self,
record: R,
zone_origin: Name
) -> ClientResult<DnsResponse>where
R: IntoRecordSet,
Deletes a record (by rdata) from an rrset, optionally require the rrset to exist. Read more
sourcefn delete_rrset(
&self,
record: Record,
zone_origin: Name
) -> ClientResult<DnsResponse>
fn delete_rrset(
&self,
record: Record,
zone_origin: Name
) -> ClientResult<DnsResponse>
Deletes an entire rrset, optionally require the rrset to exist. Read more
sourcefn delete_all(
&self,
name_of_records: Name,
zone_origin: Name,
dns_class: DNSClass
) -> ClientResult<DnsResponse>
fn delete_all(
&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> RefUnwindSafe for SyncClient<CC>where
CC: RefUnwindSafe,
impl<CC> Send for SyncClient<CC>where
CC: Send,
impl<CC> Sync for SyncClient<CC>where
CC: Sync,
impl<CC> Unpin for SyncClient<CC>where
CC: Unpin,
impl<CC> UnwindSafe for SyncClient<CC>where
CC: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more