pub struct StreamCollector { /* private fields */ }Expand description
A higher-level projection over a recorded GraphEvent stream.
Where GraphEventRecorder hands back raw events, StreamCollector slices
them into the views a test usually wants: the executed-node order, the nodes
that wrote state, the (from, to) routes the executor selected, the emitted
interrupts, the persisted-checkpoint count, and any custom node writes.
Implementations§
Source§impl StreamCollector
impl StreamCollector
Sourcepub fn new(events: Vec<GraphEvent>) -> Self
pub fn new(events: Vec<GraphEvent>) -> Self
Wraps an owned event sequence for projection.
Sourcepub fn events(&self) -> &[GraphEvent]
pub fn events(&self) -> &[GraphEvent]
The recorded events, unprojected.
Sourcepub fn node_order(&self) -> Vec<NodeId>
pub fn node_order(&self) -> Vec<NodeId>
The executed-node order (one entry per
GraphEvent::NodeCompleted).
Sourcepub fn updates(&self) -> Vec<NodeId>
pub fn updates(&self) -> Vec<NodeId>
The nodes that wrote state, in order (one entry per StateUpdated).
Sourcepub fn routes(&self) -> Vec<(NodeId, NodeId)>
pub fn routes(&self) -> Vec<(NodeId, NodeId)>
The (from, to) routes the executor selected, in order.
Sourcepub fn interrupts(&self) -> Vec<Interrupt>
pub fn interrupts(&self) -> Vec<Interrupt>
The interrupts emitted during the run, in order.
Sourcepub fn checkpoint_count(&self) -> usize
pub fn checkpoint_count(&self) -> usize
The number of persisted checkpoints (one per CheckpointSaved).
Trait Implementations§
Source§impl Clone for StreamCollector
impl Clone for StreamCollector
Source§fn clone(&self) -> StreamCollector
fn clone(&self) -> StreamCollector
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 Default for StreamCollector
impl Default for StreamCollector
Source§fn default() -> StreamCollector
fn default() -> StreamCollector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StreamCollector
impl RefUnwindSafe for StreamCollector
impl Send for StreamCollector
impl Sync for StreamCollector
impl Unpin for StreamCollector
impl UnsafeUnpin for StreamCollector
impl UnwindSafe for StreamCollector
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