Struct trust_dns_client::udp::UdpClientConnection
source · pub struct UdpClientConnection { /* private fields */ }
Expand description
UDP based DNS Client connection
Use with trust_dns_client::client::Client
impls
Implementations§
source§impl UdpClientConnection
impl UdpClientConnection
sourcepub fn new(name_server: SocketAddr) -> ClientResult<Self>
pub fn new(name_server: SocketAddr) -> ClientResult<Self>
Creates a new client connection. With a default timeout of 5 seconds
Arguments
name_server
- address of the name server to use for queries
sourcepub fn with_timeout(
name_server: SocketAddr,
timeout: Duration
) -> ClientResult<Self>
pub fn with_timeout( name_server: SocketAddr, timeout: Duration ) -> ClientResult<Self>
Allows a custom timeout
sourcepub fn with_bind_addr_and_timeout(
name_server: SocketAddr,
bind_addr: Option<SocketAddr>,
timeout: Duration
) -> ClientResult<Self>
pub fn with_bind_addr_and_timeout( name_server: SocketAddr, bind_addr: Option<SocketAddr>, timeout: Duration ) -> ClientResult<Self>
Creates a new client connection. With a default timeout of 5 seconds
Arguments
name_server
- address of the name server to use for queriesbind_addr
- IP address and port to connect fromtimeout
- connection timeout
Trait Implementations§
source§impl ClientConnection for UdpClientConnection
impl ClientConnection for UdpClientConnection
§type Sender = UdpClientStream<UdpSocket, Signer>
type Sender = UdpClientStream<UdpSocket, Signer>
The associated DNS RequestSender type.
§type SenderFuture = UdpClientConnect<UdpSocket, Signer>
type SenderFuture = UdpClientConnect<UdpSocket, Signer>
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 Clone for UdpClientConnection
impl Clone for UdpClientConnection
source§fn clone(&self) -> UdpClientConnection
fn clone(&self) -> UdpClientConnection
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 moreimpl Copy for UdpClientConnection
Auto Trait Implementations§
impl RefUnwindSafe for UdpClientConnection
impl Send for UdpClientConnection
impl Sync for UdpClientConnection
impl Unpin for UdpClientConnection
impl UnwindSafe for UdpClientConnection
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