pub struct RunState<S> {
pub user: S,
pub errors: IndexMap<NodeId, BspError>,
pub step: u64,
/* private fields */
}Expand description
The complete schedulable state of one run: consumer state, value store, and all activation accounting. Suspension, resumption, and step-limit results all package this.
Fields§
§user: SThe consumer-owned state. The engine moves it; it never inspects it.
errors: IndexMap<NodeId, BspError>The node errors recorded so far (populated by RouteToErrorEdge recovery).
step: u64Number of supersteps executed so far (counts toward max_steps).
Implementations§
Source§impl<S> RunState<S>
impl<S> RunState<S>
Sourcepub const fn values(&self) -> &ValueStore
pub const fn values(&self) -> &ValueStore
The engine-owned value store.
Sourcepub const fn values_mut(&mut self) -> &mut ValueStore
pub const fn values_mut(&mut self) -> &mut ValueStore
Mutable access to the engine-owned value store (e.g. to restore pin state out of band).
Sourcepub const fn iterations(&self) -> &IndexMap<EdgeId, u64>
pub const fn iterations(&self) -> &IndexMap<EdgeId, u64>
Per-edge iteration counters, keyed by edge declaration index.
Sourcepub const fn executions(&self) -> &IndexMap<NodeId, u64>
pub const fn executions(&self) -> &IndexMap<NodeId, u64>
Per-node execution counters (counts execute invocations, including retries).
Sourcepub fn execution_count(&self, node_id: NodeId) -> u64
pub fn execution_count(&self, node_id: NodeId) -> u64
How many times a node has executed so far.
Sourcepub fn iteration_count(&self, edge: EdgeId) -> u64
pub fn iteration_count(&self, edge: EdgeId) -> u64
How many times an edge has fired against its iteration budget so far.
Trait Implementations§
Source§impl<S> BspOutputMapExt for RunState<S>
impl<S> BspOutputMapExt for RunState<S>
Auto Trait Implementations§
impl<S> !RefUnwindSafe for RunState<S>
impl<S> !UnwindSafe for RunState<S>
impl<S> Freeze for RunState<S>where
S: Freeze,
impl<S> Send for RunState<S>where
S: Send,
impl<S> Sync for RunState<S>where
S: Sync,
impl<S> Unpin for RunState<S>where
S: Unpin,
impl<S> UnsafeUnpin for RunState<S>where
S: UnsafeUnpin,
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