Skip to main content

Crate trellis_core

Crate trellis_core 

Source
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.
AuditEntry
Deterministic audit record for an input transaction.
CollectionContext
Read-only context passed to pure collection node computations.
CollectionDiffTrace
Payload-neutral structural summary for a collection diff.
CollectionNode
Typed handle for a collection node.
DependencyList
Deterministic list of explicit node dependencies.
DeriveContext
Read-only context passed to pure derived node computations.
DerivedNode
Typed handle for a derived node.
ErrorAuditEvent
Deterministic audit event for a failed transaction.
FullRecomputeCheck
Result of comparing incremental graph state against full recompute.
Graph
Trellis graph skeleton with transactional input mutation.
HostResourceStatus
Canonical host report for a resource command observed outside the graph.
InputNode
Typed handle for an input node.
InvariantResultTrace
Optional invariant result layered by testing support.
MapDiff
Deterministic structural diff for a map collection.
MaterializedOutput
Typed handle for a materialized output surface.
NodeChangeExplanation
Explanation for why a node last changed.
NodeId
Stable graph-local identity for a node.
NodeMeta
Inspectable metadata for a graph node.
OutputContext
Read-only context passed to materialized output computations.
OutputFrame
Data-only materialized output frame returned from a transaction.
OutputFrameExplanation
Explanation for the latest frame emitted for an output key.
OutputFrameTrace
Payload-free output frame trace.
OutputKey
Stable graph-local identity for a materialized output.
OutputMeta
Inspectable metadata for a materialized output.
OutputOptions
Per-output emission options.
PlanContext
Read-only context passed to resource planners.
Removed
A value that was removed from a structural diff.
ResourceCommandExplanation
Explanation for the latest command emitted for a resource key.
ResourceCommandTrace
Payload-free resource command trace.
ResourceKey
Stable identity for a desired external resource.
ResourcePlan
Ordered data-only resource plan returned from graph propagation.
Revision
Monotonic graph revision marker.
ScopeId
Stable graph-local identity for a scope.
ScopeLifecycleTrace
Scope lifecycle event emitted by a transaction.
ScopeMeta
Inspectable metadata for a graph scope.
ScopeResourceInventory
Deterministic resource inventory for a scope.
SetDiff
Deterministic structural diff for a set collection.
StagedInputChange
A staged canonical input write accepted by a transaction.
TraceMismatch
Difference between two replay trace sequences.
Transaction
Staged canonical input transaction.
TransactionId
Monotonic transaction identity marker.
TransactionOptions
Configuration for committing input changes.
TransactionResult
Result returned by a committed input transaction.
TransactionTrace
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§

AuditEvent
Deterministic transaction event emitted in the audit log.
ClearReason
Reason a materialized output was cleared.
CollectionDiffKind
Payload-neutral collection diff shape.
DeriveError
Error returned by a pure derived node computation.
ErrorCategory
Top-level error category for deterministic failure handling.
ErrorTarget
Stable graph target involved in an error.
GraphError
Errors for graph metadata and input transaction operations.
HostResourceOutcome
Host-observed resource outcome carried by a canonical status input.
NodeKind
The metadata kind of a graph node.
OutputError
User-defined output materialization failure.
OutputFrameKind
Data-only output frame kind.
OutputFrameKindTrace
Output frame kind without materialized payload.
PlanError
User-defined resource planning failure.
RebaselineReason
Reason a materialized output was rebaselined.
ResourceCommand
Data-only command describing an external resource lifecycle change.
ResourceCommandCause
Graph-visible cause for an emitted resource command.
ResourceCommandKind
Resource command operation without application payload.
ResourceTransitionPolicy
Structural resource transition policy without application payload.
ScopeLifecycleKind
Test-observable scope lifecycle transition.
StagedInputOutcome
Test-observable outcome for a staged input write.
TransactionPhase
Test-observable transaction propagation phase.

Traits§

NodeHandle
Common behavior for typed node handles.

Functions§

assert_transaction_traces_match
Compares two deterministic transaction trace sequences.

Type Aliases§

GraphResult
Result type used by graph metadata operations.