Skip to main content

CompiledGraph

Struct CompiledGraph 

Source
pub struct CompiledGraph { /* private fields */ }
Expand description

Canonical, schema-pinned declarative graph compiled before admission.

Implementations§

Source§

impl CompiledGraph

Source

pub const MAX_NODES: usize = ReadyNodes::MAX_LEN

Hard node ceiling for one compiled graph.

Source

pub const MAX_ROUTES: usize

Hard aggregate route ceiling for one compiled graph.

Source

pub const MAX_DEFINITION_BYTES: usize

Hard canonical descriptor byte ceiling.

Source

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.

Source

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.

Source

pub const fn child_runs(&self) -> Option<&GraphChildRunPolicy>

Returns the exact delegation policy, or no authority to select children.

Source

pub const fn identity(&self) -> &CapabilityIdentity

Returns the owner-qualified graph identity.

Source

pub const fn input_schema(&self) -> &SchemaReference

Returns the admitted graph input schema.

Source

pub const fn state_schema(&self) -> &SchemaReference

Returns the immutable checkpoint state schema.

Source

pub const fn update_schema(&self) -> &SchemaReference

Returns the schema every node update must use.

Source

pub const fn output_schema(&self) -> &SchemaReference

Returns the successful terminal output schema.

Source

pub const fn reducer(&self) -> &GraphReducerReference

Returns the exact executable reducer revision.

Source

pub const fn entry_nodes(&self) -> &ReadyNodes

Returns the deterministic initial ready set.

Source

pub const fn nodes(&self) -> &[GraphNode]

Returns compiled nodes in stable identity order.

Source

pub const fn limits(&self) -> GraphExecutionLimits

Returns immutable graph execution limits.

Source

pub const fn definition_digest(&self) -> Digest

Returns SHA-256 over the exact canonical definition bytes.

Source

pub fn reference(&self) -> GraphReference

Returns the compact reference stored by every checkpoint.

Source

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.

Source

pub fn node(&self, node_id: &NodeId) -> Option<&GraphNode>

Looks up one compiled node by exact identity.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompiledGraph

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CompiledGraph

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for CompiledGraph

Source§

impl JsonSchema for CompiledGraph

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for CompiledGraph

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for CompiledGraph

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CompiledGraph

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.