Struct trust_dns_client::https::HttpsClientConnection
source · pub struct HttpsClientConnection<T> { /* private fields */ }
Available on crate feature
dns-over-https
only.Expand description
UDP based DNS Client connection
Use with trust_dns_client::client::Client
impls
Implementations§
source§impl<T> HttpsClientConnection<T>
impl<T> HttpsClientConnection<T>
sourcepub fn new(
name_server: SocketAddr,
dns_name: String,
client_config: Arc<ClientConfig>
) -> Self
pub fn new( name_server: SocketAddr, dns_name: String, client_config: Arc<ClientConfig> ) -> Self
Creates a new client connection.
Note this has side affects of starting the listening event_loop. Expect this to change in the future.
Arguments
name_server
- IP and Port for the remote DNS resolverdns_name
- The DNS name, Subject Public Key Info (SPKI) name, as associated to a certificateclient_config
- The TLS config
sourcepub fn new_with_bind_addr(
name_server: SocketAddr,
bind_addr: Option<SocketAddr>,
dns_name: String,
client_config: Arc<ClientConfig>
) -> Self
pub fn new_with_bind_addr( name_server: SocketAddr, bind_addr: Option<SocketAddr>, dns_name: String, client_config: Arc<ClientConfig> ) -> Self
Creates a new client connection with a specified source address.
Note this has side affects of starting the listening event_loop. Expect this to change in the future.
Arguments
name_server
- IP and Port for the remote DNS resolverbind_addr
- IP and port to connect fromdns_name
- The DNS name, Subject Public Key Info (SPKI) name, as associated to a certificateclient_config
- The TLS config
Trait Implementations§
source§impl<T> ClientConnection for HttpsClientConnection<T>where
T: Connect,
impl<T> ClientConnection for HttpsClientConnection<T>where
T: Connect,
§type Sender = HttpsClientStream
type Sender = HttpsClientStream
The associated DNS RequestSender type.
§type SenderFuture = HttpsClientConnect<T>
type SenderFuture = HttpsClientConnect<T>
A future that resolves to the RequestSender
source§fn new_stream(&self, _signer: Option<Arc<Signer>>) -> Self::SenderFuture
fn new_stream(&self, _signer: Option<Arc<Signer>>) -> Self::SenderFuture
Construct a new stream for use in the Client
source§impl<T: Clone> Clone for HttpsClientConnection<T>
impl<T: Clone> Clone for HttpsClientConnection<T>
source§fn clone(&self) -> HttpsClientConnection<T>
fn clone(&self) -> HttpsClientConnection<T>
Returns a copy 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 moreAuto Trait Implementations§
impl<T> !RefUnwindSafe for HttpsClientConnection<T>
impl<T> Send for HttpsClientConnection<T>where
T: Send,
impl<T> Sync for HttpsClientConnection<T>where
T: Sync,
impl<T> Unpin for HttpsClientConnection<T>where
T: Unpin,
impl<T> !UnwindSafe for HttpsClientConnection<T>
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