Struct trillium_tokio::ClientConfig
source · pub struct ClientConfig {
pub nodelay: Option<bool>,
pub ttl: Option<u32>,
pub linger: Option<Option<Duration>>,
}
Expand description
configuration for the tcp Connector
Fields§
§nodelay: Option<bool>
disable nagle’s algorithm
see [TcpStream::set_nodelay
] for more info
ttl: Option<u32>
time to live for the tcp protocol. set [TcpStream::set_ttl
] for more info
linger: Option<Option<Duration>>
sets SO_LINGER. I don’t really understand this, but see
[TcpStream::set_linger
] for more info
Implementations§
source§impl ClientConfig
impl ClientConfig
sourcepub const fn with_nodelay(self, nodelay: bool) -> Self
pub const fn with_nodelay(self, nodelay: bool) -> Self
chainable setter to set default nodelay
sourcepub const fn with_linger(self, linger: Option<Duration>) -> Self
pub const fn with_linger(self, linger: Option<Duration>) -> Self
chainable setter for linger
Trait Implementations§
source§impl Clone for ClientConfig
impl Clone for ClientConfig
source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
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 Connector for ClientConfig
impl Connector for ClientConfig
type Transport = TokioTransport<Compat<TcpStream>>
source§fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 Url,
) -> Pin<Box<dyn Future<Output = Result<Self::Transport>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 Url,
) -> Pin<Box<dyn Future<Output = Result<Self::Transport>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Initiate a connection to the provided url Read more
fn spawn<Fut: Future<Output = ()> + Send + 'static>(&self, fut: Fut)
source§impl Debug for ClientConfig
impl Debug for ClientConfig
source§impl Default for ClientConfig
impl Default for ClientConfig
source§fn default() -> ClientConfig
fn default() -> ClientConfig
Returns the “default value” for a type. Read more
impl Copy for ClientConfig
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnwindSafe for ClientConfig
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)