pub struct ServerConfig(/* private fields */);Expand description
Represents the thread-safe, shareable server configuration.
This structure wraps ServerConfigInner in an Arc<RwLock<ServerConfigInner>>
to allow for safe concurrent access and modification of the server settings.
Implementations§
Source§impl ServerConfig
Implementation block for ServerConfig.
impl ServerConfig
Implementation block for ServerConfig.
Sourcepub async fn enable_nodelay(&self) -> &Self
pub async fn enable_nodelay(&self) -> &Self
Sourcepub async fn disable_nodelay(&self) -> &Self
pub async fn disable_nodelay(&self) -> &Self
Sourcepub async fn linger(&self, linger_opt: OptionDuration) -> &Self
pub async fn linger(&self, linger_opt: OptionDuration) -> &Self
Sourcepub async fn enable_linger(&self, linger: Duration) -> &Self
pub async fn enable_linger(&self, linger: Duration) -> &Self
Sourcepub async fn disable_linger(&self) -> &Self
pub async fn disable_linger(&self) -> &Self
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
Implements the Default trait for ServerConfig.
impl Default for ServerConfig
Implements the Default trait for ServerConfig.
This wraps the default ServerConfigInner in an Arc<RwLock>.
Source§impl Display for ServerConfig
impl Display for ServerConfig
Source§impl PartialEq for ServerConfig
Implements the PartialEq trait for ServerConfig.
impl PartialEq for ServerConfig
Implements the PartialEq trait for ServerConfig.
This allows for comparing two ServerConfig instances for equality.
Source§fn eq(&self, other: &Self) -> bool
fn eq(&self, other: &Self) -> bool
Checks if two ServerConfig instances are equal.
It first checks for pointer equality for performance. If the pointers are not equal,
it compares the inner ServerConfigInner values.
§Arguments
&Self: The otherServerConfigto compare against.
§Returns
A bool indicating whether the configurations are equal.
impl Eq for ServerConfig
Implements the Eq trait for ServerConfig.
This indicates that ServerConfig has a total equality relation.