pub enum PushResult {
Accepted,
DroppedNewest(StreamItem),
DroppedOldest(StreamItem),
Rejected(StreamItem),
Closed(StreamItem),
}Expand description
Outcome of pushing a single packet into a push stream.
The variant records what the spine did with the packet under the active
BufferPolicy. Every variant except PushResult::Accepted carries the
packet back so the caller can route the rejected or evicted item elsewhere.
Map a result to its kernel-facing BackpressureOutcome with
PushResult::outcome.
Variants§
Accepted
The packet was admitted to the queue.
DroppedNewest(StreamItem)
The queue was full; this newest packet was dropped under the drop-newest policy.
DroppedOldest(StreamItem)
The queue was full; the oldest queued packet was evicted to make room, and that evicted packet is returned here.
Rejected(StreamItem)
The queue was full and the error policy refused the push; the packet is returned unaccepted.
Closed(StreamItem)
The stream was already closed; the packet is returned unaccepted.
Implementations§
Source§impl PushResult
impl PushResult
Sourcepub fn outcome(&self) -> BackpressureOutcome
pub fn outcome(&self) -> BackpressureOutcome
Maps this push result to the kernel-facing BackpressureOutcome.
Trait Implementations§
Source§impl Clone for PushResult
impl Clone for PushResult
Source§fn clone(&self) -> PushResult
fn clone(&self) -> PushResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PushResult
impl Debug for PushResult
impl Eq for PushResult
Source§impl PartialEq for PushResult
impl PartialEq for PushResult
Source§fn eq(&self, other: &PushResult) -> bool
fn eq(&self, other: &PushResult) -> bool
self and other values to be equal, and is used by ==.