Struct libp2p_yamux::WindowUpdateMode [−][src]
The window update mode determines when window updates are sent to the remote, giving it new credit to send more data.
Implementations
impl WindowUpdateMode
[src]
pub fn on_receive() -> Self
[src]
The window update mode whereby the remote is given new credit via a window update whenever the current receive window is exhausted when data is received, i.e. this mode cannot exert back-pressure from application code that is slow to read from a substream.
Note: The receive buffer may overflow with this strategy if the receiver is too slow in reading the data from the buffer. The maximum receive buffer size must be tuned appropriately for the desired throughput and level of tolerance for (temporarily) slow receivers.
pub fn on_read() -> Self
[src]
The window update mode whereby the remote is given new credit only when the current receive window is exhausted when data is read from the substream's receive buffer, i.e. application code that is slow to read from a substream exerts back-pressure on the remote.
Note: If the receive window of a substream on both peers is exhausted and both peers are blocked on sending data before reading from the stream, a deadlock occurs. To avoid this situation, reading from a substream should never be blocked on writing to the same substream.
Note: With this strategy, there is usually no point in the receive buffer being larger than the window size.
Auto Trait Implementations
impl RefUnwindSafe for WindowUpdateMode
[src]
impl Send for WindowUpdateMode
[src]
impl Sync for WindowUpdateMode
[src]
impl Unpin for WindowUpdateMode
[src]
impl UnwindSafe for WindowUpdateMode
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,