pub struct CompiledGraph { /* private fields */ }Expand description
Canonical, schema-pinned declarative graph compiled before admission.
Implementations§
Source§impl CompiledGraph
impl CompiledGraph
Sourcepub const MAX_ROUTES: usize
pub const MAX_ROUTES: usize
Hard aggregate route ceiling for one compiled graph.
Sourcepub const MAX_DEFINITION_BYTES: usize
pub const MAX_DEFINITION_BYTES: usize
Hard canonical descriptor byte ceiling.
Sourcepub fn compile<I>(
identity: CapabilityIdentity,
input_schema: SchemaReference,
state_schema: SchemaReference,
update_schema: SchemaReference,
output_schema: SchemaReference,
reducer: GraphReducerReference,
entry_nodes: ReadyNodes,
nodes: I,
limits: GraphExecutionLimits,
) -> Result<Self, GraphCompileError>where
I: IntoIterator<Item = GraphNode>,
pub fn compile<I>(
identity: CapabilityIdentity,
input_schema: SchemaReference,
state_schema: SchemaReference,
update_schema: SchemaReference,
output_schema: SchemaReference,
reducer: GraphReducerReference,
entry_nodes: ReadyNodes,
nodes: I,
limits: GraphExecutionLimits,
) -> Result<Self, GraphCompileError>where
I: IntoIterator<Item = GraphNode>,
Compiles and checksums one trusted declarative graph descriptor.
§Errors
Rejects duplicate/missing identities, unreachable nodes, paths that cannot reach a wait or terminal boundary, limit violations, and canonical descriptors above the hard byte ceiling.
Sourcepub fn with_child_runs(
self,
policy: GraphChildRunPolicy,
) -> Result<Self, GraphCompileError>
pub fn with_child_runs( self, policy: GraphChildRunPolicy, ) -> Result<Self, GraphCompileError>
Pins finite child delegation declarations into a new graph definition.
The resulting reference differs from this graph’s old reference. Bind executors only after this call. Graphs without a policy retain their exact previous canonical encoding and delegate nothing. Target registry closure and live admission checks remain separate requirements.
Sourcepub const fn child_runs(&self) -> Option<&GraphChildRunPolicy>
pub const fn child_runs(&self) -> Option<&GraphChildRunPolicy>
Returns the exact delegation policy, or no authority to select children.
Sourcepub const fn identity(&self) -> &CapabilityIdentity
pub const fn identity(&self) -> &CapabilityIdentity
Returns the owner-qualified graph identity.
Sourcepub const fn input_schema(&self) -> &SchemaReference
pub const fn input_schema(&self) -> &SchemaReference
Returns the admitted graph input schema.
Sourcepub const fn state_schema(&self) -> &SchemaReference
pub const fn state_schema(&self) -> &SchemaReference
Returns the immutable checkpoint state schema.
Sourcepub const fn update_schema(&self) -> &SchemaReference
pub const fn update_schema(&self) -> &SchemaReference
Returns the schema every node update must use.
Sourcepub const fn output_schema(&self) -> &SchemaReference
pub const fn output_schema(&self) -> &SchemaReference
Returns the successful terminal output schema.
Sourcepub const fn reducer(&self) -> &GraphReducerReference
pub const fn reducer(&self) -> &GraphReducerReference
Returns the exact executable reducer revision.
Sourcepub const fn entry_nodes(&self) -> &ReadyNodes
pub const fn entry_nodes(&self) -> &ReadyNodes
Returns the deterministic initial ready set.
Sourcepub const fn limits(&self) -> GraphExecutionLimits
pub const fn limits(&self) -> GraphExecutionLimits
Returns immutable graph execution limits.
Sourcepub const fn definition_digest(&self) -> Digest
pub const fn definition_digest(&self) -> Digest
Returns SHA-256 over the exact canonical definition bytes.
Sourcepub fn reference(&self) -> GraphReference
pub fn reference(&self) -> GraphReference
Returns the compact reference stored by every checkpoint.
Sourcepub fn canonical_definition_bytes(&self) -> Result<Vec<u8>, GraphCompileError>
pub fn canonical_definition_bytes(&self) -> Result<Vec<u8>, GraphCompileError>
Returns exact canonical descriptor bytes excluding the redundant digest.
§Errors
Fails closed if the canonical serializer rejects the closed descriptor.
Sourcepub fn node(&self, node_id: &NodeId) -> Option<&GraphNode>
pub fn node(&self, node_id: &NodeId) -> Option<&GraphNode>
Looks up one compiled node by exact identity.
Sourcepub fn plan_barrier<V, R>(
&self,
base: &Checkpoint,
results: &[PendingNodeResult],
successor_id: CheckpointId,
schemas: &V,
reducer: &R,
) -> Result<GraphBarrierPlan, GraphBarrierPlanError>
pub fn plan_barrier<V, R>( &self, base: &Checkpoint, results: &[PendingNodeResult], successor_id: CheckpointId, schemas: &V, reducer: &R, ) -> Result<GraphBarrierPlan, GraphBarrierPlanError>
Plans one complete deterministic barrier outside a storage transaction.
§Errors
Rejects graph/checkpoint drift, incomplete or substituted results, schema failures, unpinned reducers, invalid controls, step/parallelism limits, reducer panic/failure, and successor/barrier construction errors.
Trait Implementations§
Source§impl Clone for CompiledGraph
impl Clone for CompiledGraph
Source§impl Debug for CompiledGraph
impl Debug for CompiledGraph
Source§impl<'de> Deserialize<'de> for CompiledGraph
impl<'de> Deserialize<'de> for CompiledGraph
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 CompiledGraph
Source§impl JsonSchema for CompiledGraph
impl JsonSchema for CompiledGraph
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more