pub struct StreamFaultPlan { /* private fields */ }Expand description
An ordered list of faults to apply to a stream’s item sequence.
Implementations§
Source§impl StreamFaultPlan
impl StreamFaultPlan
Sourcepub fn new(faults: Vec<StreamFaultSpec>) -> Self
pub fn new(faults: Vec<StreamFaultSpec>) -> Self
Builds a plan from an ordered list of fault specs.
Sourcepub fn faults(&self) -> &[StreamFaultSpec]
pub fn faults(&self) -> &[StreamFaultSpec]
Returns the plan’s fault specs in application order.
Sourcepub fn apply(&self, items: &[StreamItem]) -> StreamFaultResult
pub fn apply(&self, items: &[StreamItem]) -> StreamFaultResult
Applies every fault in order to a copy of items.
Item-level faults rewrite the sequence; transport-level faults are recorded as diagnostics without altering items. Returns the rewritten items together with one diagnostic symbol per applied fault.
Trait Implementations§
Source§impl Clone for StreamFaultPlan
impl Clone for StreamFaultPlan
Source§fn clone(&self) -> StreamFaultPlan
fn clone(&self) -> StreamFaultPlan
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 moreSource§impl Debug for StreamFaultPlan
impl Debug for StreamFaultPlan
Source§impl Default for StreamFaultPlan
impl Default for StreamFaultPlan
Source§fn default() -> StreamFaultPlan
fn default() -> StreamFaultPlan
Returns the “default value” for a type. Read more
impl Eq for StreamFaultPlan
Source§impl PartialEq for StreamFaultPlan
impl PartialEq for StreamFaultPlan
Source§fn eq(&self, other: &StreamFaultPlan) -> bool
fn eq(&self, other: &StreamFaultPlan) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StreamFaultPlan
Auto Trait Implementations§
impl Freeze for StreamFaultPlan
impl RefUnwindSafe for StreamFaultPlan
impl Send for StreamFaultPlan
impl Sync for StreamFaultPlan
impl Unpin for StreamFaultPlan
impl UnsafeUnpin for StreamFaultPlan
impl UnwindSafe for StreamFaultPlan
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