pub struct AsyncStepGraph {
pub steps: Vec<StepNode>,
pub edges: Vec<(usize, usize)>,
}Expand description
An extracted async step graph.
Steps are connected by sequential edges representing execution order.
§Examples
use async_reify::{AsyncStepGraph, StepNode, StepOutcome};
let graph = AsyncStepGraph {
steps: vec![
StepNode { id: 0, label: "start".into(), duration_us: 100, outcome: StepOutcome::Completed },
StepNode { id: 1, label: "end".into(), duration_us: 50, outcome: StepOutcome::Completed },
],
edges: vec![(0, 1)],
};
assert_eq!(graph.steps.len(), 2);Fields§
§steps: Vec<StepNode>The steps (nodes) in the graph.
edges: Vec<(usize, usize)>Directed edges between steps (sequential and branch).
Trait Implementations§
Source§impl Clone for AsyncStepGraph
impl Clone for AsyncStepGraph
Source§fn clone(&self) -> AsyncStepGraph
fn clone(&self) -> AsyncStepGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AsyncStepGraph
impl RefUnwindSafe for AsyncStepGraph
impl Send for AsyncStepGraph
impl Sync for AsyncStepGraph
impl Unpin for AsyncStepGraph
impl UnsafeUnpin for AsyncStepGraph
impl UnwindSafe for AsyncStepGraph
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