Expand description
Core graph skeleton for Trellis.
This crate currently defines typed identities, graph metadata, scope metadata, declared dependencies, deterministic inspection, input transactions, pure derived node recomputation, collection diffs, and data-only resource plans with recursive scope teardown and materialized output frames. Transaction results include deterministic phase traces, and failures expose typed categories.
§API stability
Trellis is pre-1.0. Core semantics are intended to be more stable than item names and exact signatures: resource plans are data, graph mutation is transactional, dependencies are explicit, scopes own lifecycle, outputs are revisioned, and incremental behavior must remain checkable against full recompute.
Modules§
- testing
- Deterministic model-test helpers for oracle and replay checks.
Structs§
- Added
- A value that was added to a structural diff.
- Audit
Entry - Deterministic audit record for an input transaction.
- Collection
Context - Read-only context passed to pure collection node computations.
- Collection
Diff Trace - Payload-neutral structural summary for a collection diff.
- Collection
Node - Typed handle for a collection node.
- Dependency
List - Deterministic list of explicit node dependencies.
- Derive
Context - Read-only context passed to pure derived node computations.
- Derived
Node - Typed handle for a derived node.
- Error
Audit Event - Deterministic audit event for a failed transaction.
- Full
Recompute Check - Result of comparing incremental graph state against full recompute.
- Graph
- Trellis graph skeleton with transactional input mutation.
- Host
Resource Status - Canonical host report for a resource command observed outside the graph.
- Input
Node - Typed handle for an input node.
- Invariant
Result Trace - Optional invariant result layered by testing support.
- MapDiff
- Deterministic structural diff for a map collection.
- Materialized
Output - Typed handle for a materialized output surface.
- Node
Change Explanation - Explanation for why a node last changed.
- NodeId
- Stable graph-local identity for a node.
- Node
Meta - Inspectable metadata for a graph node.
- Output
Context - Read-only context passed to materialized output computations.
- Output
Frame - Data-only materialized output frame returned from a transaction.
- Output
Frame Explanation - Explanation for the latest frame emitted for an output key.
- Output
Frame Trace - Payload-free output frame trace.
- Output
Key - Stable graph-local identity for a materialized output.
- Output
Meta - Inspectable metadata for a materialized output.
- Output
Options - Per-output emission options.
- Plan
Context - Read-only context passed to resource planners.
- Removed
- A value that was removed from a structural diff.
- Resource
Command Explanation - Explanation for the latest command emitted for a resource key.
- Resource
Command Trace - Payload-free resource command trace.
- Resource
Key - Stable identity for a desired external resource.
- Resource
Plan - Ordered data-only resource plan returned from graph propagation.
- Revision
- Monotonic graph revision marker.
- ScopeId
- Stable graph-local identity for a scope.
- Scope
Lifecycle Trace - Scope lifecycle event emitted by a transaction.
- Scope
Meta - Inspectable metadata for a graph scope.
- Scope
Resource Inventory - Deterministic resource inventory for a scope.
- SetDiff
- Deterministic structural diff for a set collection.
- Staged
Input Change - A staged canonical input write accepted by a transaction.
- Trace
Mismatch - Difference between two replay trace sequences.
- Transaction
- Staged canonical input transaction.
- Transaction
Id - Monotonic transaction identity marker.
- Transaction
Options - Configuration for committing input changes.
- Transaction
Result - Result returned by a committed input transaction.
- Transaction
Trace - Deterministic payload-free projection of a committed transaction result.
- Unchanged
- A value that was unchanged in a structural diff.
- Updated
- A map entry that changed value without changing key identity.
Enums§
- Audit
Event - Deterministic transaction event emitted in the audit log.
- Clear
Reason - Reason a materialized output was cleared.
- Collection
Diff Kind - Payload-neutral collection diff shape.
- Derive
Error - Error returned by a pure derived node computation.
- Error
Category - Top-level error category for deterministic failure handling.
- Error
Target - Stable graph target involved in an error.
- Graph
Error - Errors for graph metadata and input transaction operations.
- Host
Resource Outcome - Host-observed resource outcome carried by a canonical status input.
- Node
Kind - The metadata kind of a graph node.
- Output
Error - User-defined output materialization failure.
- Output
Frame Kind - Data-only output frame kind.
- Output
Frame Kind Trace - Output frame kind without materialized payload.
- Plan
Error - User-defined resource planning failure.
- Rebaseline
Reason - Reason a materialized output was rebaselined.
- Resource
Command - Data-only command describing an external resource lifecycle change.
- Resource
Command Cause - Graph-visible cause for an emitted resource command.
- Resource
Command Kind - Resource command operation without application payload.
- Resource
Transition Policy - Structural resource transition policy without application payload.
- Scope
Lifecycle Kind - Test-observable scope lifecycle transition.
- Staged
Input Outcome - Test-observable outcome for a staged input write.
- Transaction
Phase - Test-observable transaction propagation phase.
Traits§
- Node
Handle - Common behavior for typed node handles.
Functions§
- assert_
transaction_ traces_ match - Compares two deterministic transaction trace sequences.
Type Aliases§
- Graph
Result - Result type used by graph metadata operations.