pub struct TCPConnectBuilder { /* private fields */ }
Expand description
This builder allows you to configure the TCPConnect
instance.
Implementations§
Source§impl TCPConnectBuilder
impl TCPConnectBuilder
Sourcepub fn dns_ttl(self, dns_ttl: Duration) -> TCPConnectBuilder
pub fn dns_ttl(self, dns_ttl: Duration) -> TCPConnectBuilder
Set the DNS TTL.
By default, this is set to 60 seconds.
Sourcepub fn dns_max_stale_time(
self,
dns_max_stale_time: Duration,
) -> TCPConnectBuilder
pub fn dns_max_stale_time( self, dns_max_stale_time: Duration, ) -> TCPConnectBuilder
Set the maximum time for returning a stale DNS resolution result.
After the DNS TTL (Time To Live) expires, new requests can be served stale data while a new resolution is performed in the background.
By default, this is set to 1 second.
Sourcepub fn build(self) -> TCPConnect
pub fn build(self) -> TCPConnect
Build the TCPConnect
instance.
Trait Implementations§
Source§impl Clone for TCPConnectBuilder
impl Clone for TCPConnectBuilder
Source§fn clone(&self) -> TCPConnectBuilder
fn clone(&self) -> TCPConnectBuilder
Returns a duplicate 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 moreSource§impl Debug for TCPConnectBuilder
impl Debug for TCPConnectBuilder
Source§impl Default for TCPConnectBuilder
impl Default for TCPConnectBuilder
impl Copy for TCPConnectBuilder
Auto Trait Implementations§
impl Freeze for TCPConnectBuilder
impl RefUnwindSafe for TCPConnectBuilder
impl Send for TCPConnectBuilder
impl Sync for TCPConnectBuilder
impl Unpin for TCPConnectBuilder
impl UnwindSafe for TCPConnectBuilder
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