pub struct TcpClientBuilder { /* private fields */ }
Implementations§
Source§impl TcpClientBuilder
impl TcpClientBuilder
Sourcepub fn tcp_fast_open(self, fast_open: bool) -> Self
pub fn tcp_fast_open(self, fast_open: bool) -> Self
Set TCP fast open option
Sourcepub fn tcp_keepalive(
self,
time: Option<Duration>,
interval: Option<Duration>,
retries: Option<u32>,
) -> Self
pub fn tcp_keepalive( self, time: Option<Duration>, interval: Option<Duration>, retries: Option<u32>, ) -> Self
Set TCP keepalive options
Sourcepub fn max_conns(self, conns: usize) -> Self
pub fn max_conns(self, conns: usize) -> Self
Set maximum number of TCP connections. Defaults to 1024
Sourcepub fn connect_timeout(self, value: Duration) -> Self
pub fn connect_timeout(self, value: Duration) -> Self
Timeout duration for connection creation
pub fn build(self) -> TcpClient
Trait Implementations§
Source§impl Clone for TcpClientBuilder
impl Clone for TcpClientBuilder
Source§fn clone(&self) -> TcpClientBuilder
fn clone(&self) -> TcpClientBuilder
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 moreSource§impl Debug for TcpClientBuilder
impl Debug for TcpClientBuilder
Auto Trait Implementations§
impl Freeze for TcpClientBuilder
impl RefUnwindSafe for TcpClientBuilder
impl Send for TcpClientBuilder
impl Sync for TcpClientBuilder
impl Unpin for TcpClientBuilder
impl UnwindSafe for TcpClientBuilder
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