#[non_exhaustive]pub struct ReceiveWindow {
pub connection: Option<NonZeroU64>,
pub stream: u64,
}Expand description
The receive credit a transport grants its peer, which bounds what a stream the session stops reading still holds.
A session’s ingest stops reading a group’s stream while the group’s fastest reader is far
behind, so flow control pushes back to the publisher. Such a paused stream holds the
connection credit it was granted, counted against the shared connection window, so the
session pauses only as many streams as fit in half of it; the rest keep reading. A
transport that shapes a stream’s credit (poll::RecvStream::set_window) holds a paused
one to a small allowance, which shrinks with each stream the session shapes yet sums to
under that half however many there are, so every one pauses; any other holds its stream
window. See poll::Session::receive_window.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.connection: Option<NonZeroU64>The connection-wide receive window, in bytes, or None when streams share none.
stream: u64The most receive credit one stream may hold, in bytes.
Implementations§
Source§impl ReceiveWindow
impl ReceiveWindow
Sourcepub fn new(connection: Option<NonZeroU64>, stream: u64) -> Self
pub fn new(connection: Option<NonZeroU64>, stream: u64) -> Self
A connection-wide window of connection bytes, if any, of which one stream holds at
most stream.
Trait Implementations§
Source§impl Clone for ReceiveWindow
impl Clone for ReceiveWindow
impl Copy for ReceiveWindow
Source§impl Debug for ReceiveWindow
impl Debug for ReceiveWindow
impl Eq for ReceiveWindow
Source§impl PartialEq for ReceiveWindow
impl PartialEq for ReceiveWindow
impl StructuralPartialEq for ReceiveWindow
Auto Trait Implementations§
impl Freeze for ReceiveWindow
impl RefUnwindSafe for ReceiveWindow
impl Send for ReceiveWindow
impl Sync for ReceiveWindow
impl Unpin for ReceiveWindow
impl UnsafeUnpin for ReceiveWindow
impl UnwindSafe for ReceiveWindow
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.