pub struct ExecutionGraph {
pub id: String,
pub nodes: Vec<GraphNode>,
pub revision: NonZeroU64,
pub session_id: SessionId,
}Expand description
A revision of an arbitrary static execution graph owned by one session.
These contracts do not persist, schedule, or execute nodes. Hosts validate before admission and enforce budgets, record ownership, permissions, Env conflicts, and existing worker capacity. A revision is a stale-action fence, not authorization to mutate started work or automatically replay after restart.
Fields§
§id: StringStable graph-instance identity, separate from command delivery identity.
nodes: Vec<GraphNode>Nodes in caller order; validation never reorders or dispatches them.
revision: NonZeroU64Nonzero immutable revision captured by every admitted execution/result.
session_id: SessionIdSession owning this graph and its currently supported shared local Env.
Implementations§
Source§impl ExecutionGraph
impl ExecutionGraph
Sourcepub fn validate(&self) -> Result<(), GraphContractError>
pub fn validate(&self) -> Result<(), GraphContractError>
Checks identities, execution profiles, local references, and acyclicity.
§Errors
Rejects empty graphs, blank or duplicate identities, foreign Envs, incompatible schemas/profiles, missing nodes/outputs, ungated inputs, duplicate edges, and cycles. No storage or runtime is consulted.
Sourcepub fn bind_input(
&self,
node_id: &str,
input_name: &str,
result: &GraphResult,
) -> Result<GraphResolvedInput, GraphContractError>
pub fn bind_input( &self, node_id: &str, input_name: &str, result: &GraphResult, ) -> Result<GraphResolvedInput, GraphContractError>
Pins one declared input to a host-loaded, validated or accepted version.
This checks shape and consistency only. Hosts must load result state from authoritative storage, validate all dependency gates atomically at dispatch, and persist every resolved input with the execution admission.
§Errors
Rejects invalid graphs, undeclared inputs, foreign or stale results, schema/execution mismatches, and unsatisfied result gates.
Trait Implementations§
Source§impl Clone for ExecutionGraph
impl Clone for ExecutionGraph
Source§impl Debug for ExecutionGraph
impl Debug for ExecutionGraph
Source§impl<'de> Deserialize<'de> for ExecutionGraph
impl<'de> Deserialize<'de> for ExecutionGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ExecutionGraph
Source§impl PartialEq for ExecutionGraph
impl PartialEq for ExecutionGraph
Source§impl Serialize for ExecutionGraph
impl Serialize for ExecutionGraph
impl StructuralPartialEq for ExecutionGraph
Auto Trait Implementations§
impl Forget for ExecutionGraph
impl Freeze for ExecutionGraph
impl RefUnwindSafe for ExecutionGraph
impl Send for ExecutionGraph
impl Sync for ExecutionGraph
impl Unpin for ExecutionGraph
impl UnsafeUnpin for ExecutionGraph
impl UnwindSafe for ExecutionGraph
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.