Struct trillium_testing::ClientConfig
pub struct ClientConfig {
pub nodelay: Option<bool>,
pub ttl: Option<u32>,
}
Expand description
configuration for the tcp Connector
Fields§
§nodelay: Option<bool>
disable nagle’s algorithm
ttl: Option<u32>
set a time to live for the tcp protocol
Implementations§
§impl ClientConfig
impl ClientConfig
pub const fn new() -> ClientConfig
pub const fn new() -> ClientConfig
constructs a default ClientConfig
pub const fn with_nodelay(self, nodelay: bool) -> ClientConfig
pub const fn with_nodelay(self, nodelay: bool) -> ClientConfig
chainable setter to set default nodelay
pub const fn with_ttl(self, ttl: u32) -> ClientConfig
pub const fn with_ttl(self, ttl: u32) -> ClientConfig
chainable setter for ip ttl
Trait Implementations§
§impl Clone for ClientConfig
impl Clone for ClientConfig
§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 more§impl Connector for ClientConfig
impl Connector for ClientConfig
type Transport = SmolTransport<TcpStream>
§fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 Url
) -> Pin<Box<dyn Future<Output = Result<<ClientConfig as Connector>::Transport, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ClientConfig: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 Url
) -> Pin<Box<dyn Future<Output = Result<<ClientConfig as Connector>::Transport, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ClientConfig: 'async_trait,
Initiate a connection to the provided url Read more
fn spawn<Fut>(&self, fut: Fut)
§impl Debug for ClientConfig
impl Debug for ClientConfig
§impl Default for ClientConfig
impl Default for ClientConfig
§fn default() -> ClientConfig
fn default() -> ClientConfig
Returns the “default value” for a type. Read more
impl Copy for ClientConfig
Auto Trait Implementations§
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