pub struct Pressure {
pub high: f32,
pub low: f32,
pub factor: f32,
}Expand description
Adaptive deadlines: past high of max_connections, the handshake and idle
deadlines of new and waiting connections are multiplied by factor, down to 1 s,
until the count falls below low. No cost below the threshold beyond one check
per connection opened or closed.
let p = net_io::Pressure::default();
assert!(p.high > p.low);Fields§
§high: f32Fraction of max_connections above which deadlines shrink.
low: f32Fraction below which they return to normal.
factor: f32The multiplier applied to handshake and idle timeouts.
Trait Implementations§
impl Copy for Pressure
impl StructuralPartialEq for Pressure
Auto Trait Implementations§
impl Freeze for Pressure
impl RefUnwindSafe for Pressure
impl Send for Pressure
impl Sync for Pressure
impl Unpin for Pressure
impl UnsafeUnpin for Pressure
impl UnwindSafe for Pressure
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