pub struct SuspendedExecution<S = ()> {
pub suspensions: Vec<PendingSuspension>,
/* private fields */
}Expand description
Package containing suspension parameters to resume execution later.
Fields§
§suspensions: Vec<PendingSuspension>The nodes waiting for external input, with their payloads and expected pins.
Implementations§
Source§impl<S> SuspendedExecution<S>
impl<S> SuspendedExecution<S>
Sourcepub const fn state(&self) -> &RunState<S>
pub const fn state(&self) -> &RunState<S>
Returns an immutable reference to the inner run state.
Sourcepub const fn state_mut(&mut self) -> &mut RunState<S>
pub const fn state_mut(&mut self) -> &mut RunState<S>
Returns a mutable reference to the inner run state.
Sourcepub fn into_state(self) -> RunState<S>
pub fn into_state(self) -> RunState<S>
Consumes the package, returning the inner run state.
Source§impl<S> SuspendedExecution<S>where
S: Serialize + for<'de> Deserialize<'de>,
impl<S> SuspendedExecution<S>where
S: Serialize + for<'de> Deserialize<'de>,
Sourcepub fn to_json(&self) -> Result<String, BspError>
pub fn to_json(&self) -> Result<String, BspError>
Serializes the suspension snapshot to JSON.
The pin-value store is NOT serialized. BspValue is type-erased
(Arc<dyn Any>) and has no serialized form; pretending otherwise would silently
corrupt resume fidelity. The snapshot covers the consumer state S, token
accounting, iteration/execution counters, the frontier, and the suspension list.
On resume, dataflow-profile pin values restore exclusively through waiting_inputs
re-injection (plus any consumer-managed restore of S).
Resuming a deserialized snapshot requires a BspEngine built over an identical
graph: node and edge ids are positional.