pub struct TcpBufferBounds {
pub initial: usize,
pub max: usize,
}Expand description
Bounds for a per-connection TCP ring buffer.
The buffer is allocated at initial and may grow up to max as demand
warrants. Both values are clamped to [16 KiB, 4 MiB] and rounded up to a
power of two, then initial is clamped to be no greater than max. The
advertised TCP window scale is derived from max, so max is fixed for
the connection’s lifetime.
Note that if the peer does not negotiate window scaling, the effective
receive window (and thus the useful rx capacity) is capped at u16::MAX
regardless of max.
Fields§
§initial: usizeStarting capacity, allocated up front.
max: usizeCeiling for autotuned growth.
Implementations§
Trait Implementations§
Source§impl Clone for TcpBufferBounds
impl Clone for TcpBufferBounds
Source§fn clone(&self) -> TcpBufferBounds
fn clone(&self) -> TcpBufferBounds
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 TcpBufferBounds
impl Debug for TcpBufferBounds
Source§impl Inspect for TcpBufferBounds
impl Inspect for TcpBufferBounds
Source§impl PartialEq for TcpBufferBounds
impl PartialEq for TcpBufferBounds
impl Copy for TcpBufferBounds
impl Eq for TcpBufferBounds
impl StructuralPartialEq for TcpBufferBounds
Auto Trait Implementations§
impl Freeze for TcpBufferBounds
impl RefUnwindSafe for TcpBufferBounds
impl Send for TcpBufferBounds
impl Sync for TcpBufferBounds
impl Unpin for TcpBufferBounds
impl UnsafeUnpin for TcpBufferBounds
impl UnwindSafe for TcpBufferBounds
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