pub struct ConnectionLimitsConfig {
pub max_connections_per_ip: usize,
pub max_total_connections: usize,
pub idle_timeout: String,
pub reaper_interval: String,
}Expand description
Connection limits configuration
Fields§
§max_connections_per_ip: usizeMaximum connections per IP address (0 = unlimited)
max_total_connections: usizeMaximum total connections (0 = unlimited)
idle_timeout: StringIdle timeout for connections (e.g., “300s”, “5m”)
reaper_interval: StringReaper interval for cleaning up idle connections (e.g., “60s”, “1m”)
Implementations§
Source§impl ConnectionLimitsConfig
impl ConnectionLimitsConfig
Sourcepub fn idle_timeout_seconds(&self) -> Result<u64>
pub fn idle_timeout_seconds(&self) -> Result<u64>
Parse idle timeout to seconds
Sourcepub fn reaper_interval_seconds(&self) -> Result<u64>
pub fn reaper_interval_seconds(&self) -> Result<u64>
Parse reaper interval to seconds
Trait Implementations§
Source§impl Clone for ConnectionLimitsConfig
impl Clone for ConnectionLimitsConfig
Source§fn clone(&self) -> ConnectionLimitsConfig
fn clone(&self) -> ConnectionLimitsConfig
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 ConnectionLimitsConfig
impl Debug for ConnectionLimitsConfig
Source§impl<'de> Deserialize<'de> for ConnectionLimitsConfig
impl<'de> Deserialize<'de> for ConnectionLimitsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConnectionLimitsConfig
impl RefUnwindSafe for ConnectionLimitsConfig
impl Send for ConnectionLimitsConfig
impl Sync for ConnectionLimitsConfig
impl Unpin for ConnectionLimitsConfig
impl UnsafeUnpin for ConnectionLimitsConfig
impl UnwindSafe for ConnectionLimitsConfig
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