pub struct ServerConfig(/* private fields */);Expand description
Represents the thread-safe, shareable server configuration.
This structure wraps ServerConfigData in an Arc<RwLock<ServerConfigData>>
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 buffer_size(&self, size: usize) -> &Self
pub async fn buffer_size(&self, size: usize) -> &Self
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
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
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 ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
Provides a default implementation for ServerConfig.
impl Default for ServerConfig
Provides a default implementation for ServerConfig.
Source§impl From<ServerConfigData> for ServerConfig
Implementation of From trait for ServerConfig.
impl From<ServerConfigData> for ServerConfig
Implementation of From trait 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 ServerConfigData values.
§Arguments
&Self- The otherServerConfigto compare against.
§Returns
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.
Auto Trait Implementations§
impl Freeze for ServerConfig
impl !RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl !UnwindSafe for ServerConfig
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