pub enum BackpressureOutcome {
Accepted,
DroppedNewest,
DroppedOldest,
Blocked,
TimedOut,
Rejected,
Closed,
}Expand description
Result a producer observes when it offers a packet to a buffered stream.
Variants§
Accepted
The packet was buffered.
DroppedNewest
The buffer was full and this newest packet was dropped.
DroppedOldest
The buffer was full and the oldest buffered packet was dropped to admit this one.
Blocked
The producer is blocked until capacity frees up.
TimedOut
The offer timed out before capacity freed up.
Rejected
The offer was rejected by policy.
Closed
The stream is closed and accepts no further packets.
Implementations§
Source§impl BackpressureOutcome
impl BackpressureOutcome
Sourcepub fn wire_label(self) -> &'static str
pub fn wire_label(self) -> &'static str
Returns the stable wire label for this outcome.
Sourcepub fn from_symbol(symbol: &Symbol) -> Result<Self>
pub fn from_symbol(symbol: &Symbol) -> Result<Self>
Parses an outcome from its bare or stream/backpressure-qualified
symbol.
Returns an error for an unrecognized outcome symbol.
Trait Implementations§
Source§impl Clone for BackpressureOutcome
impl Clone for BackpressureOutcome
Source§fn clone(&self) -> BackpressureOutcome
fn clone(&self) -> BackpressureOutcome
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 BackpressureOutcome
Source§impl Debug for BackpressureOutcome
impl Debug for BackpressureOutcome
impl Eq for BackpressureOutcome
Source§impl PartialEq for BackpressureOutcome
impl PartialEq for BackpressureOutcome
Source§fn eq(&self, other: &BackpressureOutcome) -> bool
fn eq(&self, other: &BackpressureOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BackpressureOutcome
Auto Trait Implementations§
impl Freeze for BackpressureOutcome
impl RefUnwindSafe for BackpressureOutcome
impl Send for BackpressureOutcome
impl Sync for BackpressureOutcome
impl Unpin for BackpressureOutcome
impl UnsafeUnpin for BackpressureOutcome
impl UnwindSafe for BackpressureOutcome
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