pub struct BufferBudget { /* private fields */ }Expand description
What one connection may hold in FrameDecoder payload buffers, as a
counter every request stream on it shares (D77).
MAX_BUFFERED_FRAME is per frame and so per stream; this is the sum over
the streams, which is the number a peer opening many of them actually
controls. super::HEADERS_BUFFER_BUDGET says why that distinction is
worth a counter and how the value was chosen.
Every request stream’s decoder holds the same one, so a share taken on any of them is a share the others cannot take. Charging happens when a decoder commits to buffering a frame and releasing when that frame completes or its decoder is dropped, so the counter reads zero on a connection with nothing half-received on it.
Trait Implementations§
Source§impl Debug for BufferBudget
impl Debug for BufferBudget
Source§impl Default for BufferBudget
impl Default for BufferBudget
Source§fn default() -> BufferBudget
fn default() -> BufferBudget
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for BufferBudget
impl RefUnwindSafe for BufferBudget
impl Send for BufferBudget
impl Sync for BufferBudget
impl Unpin for BufferBudget
impl UnsafeUnpin for BufferBudget
impl UnwindSafe for BufferBudget
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