pub enum StreamFaultKind {
Drop,
Reorder,
Duplicate,
Delay,
Cancel,
Timeout,
Disconnect,
Reconnect,
UnsupportedProfile,
}Expand description
Kind of fault a StreamFaultPlan can inject into a stream.
Each variant names a class of degraded delivery. Item-level kinds
(StreamFaultKind::Drop, StreamFaultKind::Reorder,
StreamFaultKind::Duplicate, StreamFaultKind::Delay) rewrite the item
sequence when applied; transport-level kinds only record a diagnostic.
Variants§
Drop
Discards leading items from the stream.
Reorder
Swaps the order of the first two items.
Duplicate
Re-emits the leading item one or more extra times.
Delay
Rotates leading items to the back to simulate late arrival.
Cancel
Models a consumer or producer cancellation.
Timeout
Models a delivery timeout.
Disconnect
Models a transport disconnect.
Reconnect
Models a transport reconnect.
UnsupportedProfile
Models a refused, unsupported transport profile.
Implementations§
Source§impl StreamFaultKind
impl StreamFaultKind
Sourcepub fn wire_label(self) -> &'static str
pub fn wire_label(self) -> &'static str
Returns the stable lowercase wire label for this fault kind.
Sourcepub fn from_symbol(symbol: &Symbol) -> Result<Self>
pub fn from_symbol(symbol: &Symbol) -> Result<Self>
Parses a fault kind from its bare or fully qualified symbol.
Accepts both the short label (drop) and the qualified form
(stream/fault/drop). Returns an error for any unknown fault.
Trait Implementations§
Source§impl Clone for StreamFaultKind
impl Clone for StreamFaultKind
Source§fn clone(&self) -> StreamFaultKind
fn clone(&self) -> StreamFaultKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for StreamFaultKind
Source§impl Debug for StreamFaultKind
impl Debug for StreamFaultKind
impl Eq for StreamFaultKind
Source§impl PartialEq for StreamFaultKind
impl PartialEq for StreamFaultKind
Source§fn eq(&self, other: &StreamFaultKind) -> bool
fn eq(&self, other: &StreamFaultKind) -> bool
self and other values to be equal, and is used by ==.