pub struct FlowControl { /* private fields */ }Expand description
Flow-control window with signed i64 (Spec §6.9: can transiently become negative when settings shrink the window).
Implementations§
Source§impl FlowControl
impl FlowControl
Sourcepub fn consume(&mut self, n: u32) -> Result<(), Http2Error>
pub fn consume(&mut self, n: u32) -> Result<(), Http2Error>
Consumes n bytes from the window. Spec §6.9.1.
§Errors
FlowControlExceeded if the window would become negative.
Sourcepub fn apply_window_update(&mut self, increment: u32) -> Result<(), Http2Error>
pub fn apply_window_update(&mut self, increment: u32) -> Result<(), Http2Error>
Applies a WINDOW_UPDATE. Spec §6.9.1.
§Errors
Protocol(FlowControlError) if the window
2^31-1 ueberschreitet.
Sourcepub fn apply_initial_window_size_change(&mut self, old: i64, new: i64)
pub fn apply_initial_window_size_change(&mut self, old: i64, new: i64)
Apply a new INITIAL_WINDOW_SIZE from a SETTINGS update
(spec §6.9.2): the window is adjusted by the difference.
Trait Implementations§
Source§impl Clone for FlowControl
impl Clone for FlowControl
Source§fn clone(&self) -> FlowControl
fn clone(&self) -> FlowControl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FlowControl
Source§impl Debug for FlowControl
impl Debug for FlowControl
Source§impl Default for FlowControl
impl Default for FlowControl
impl Eq for FlowControl
Source§impl PartialEq for FlowControl
impl PartialEq for FlowControl
Source§fn eq(&self, other: &FlowControl) -> bool
fn eq(&self, other: &FlowControl) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FlowControl
Auto Trait Implementations§
impl Freeze for FlowControl
impl RefUnwindSafe for FlowControl
impl Send for FlowControl
impl Sync for FlowControl
impl Unpin for FlowControl
impl UnsafeUnpin for FlowControl
impl UnwindSafe for FlowControl
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