Skip to main content

Module persistence_fields

Module persistence_fields 

Source
Expand description

Field-layer persistence DTOs (PersistedField/PersistedCoupling), re-exported through persistence. Separate file to keep persistence.rs under the per-file ceiling. Persistence DTOs for the field layer (Field + Coupling), field-system Phase 2.

Siblings to the Persisted* types in crate::persistence (re-exported there), kept in their own file so that module stays under the workspace’s per-file ceiling.

The flat field-layer enums (extent, lifecycle, selector, response) archive natively under rkyv. The one recursive piece — the scalar/vector AST (FieldDefinition, Box-nested) — rides as a serde-JSON string (PersistedField::definition_json) rather than via rkyv omit_bounds: the kernel AST is deliberately serde-only, the definition is loaded once and evaluated in memory by numen (no zero-copy benefit), and a blob keeps the archive flat and the round-trip robust. serde_json is already a base kernel dependency.

Structs§

ArchivedPersistedCoupling
An archived PersistedCoupling
ArchivedPersistedField
An archived PersistedField
PersistedCoupling
Persisted coupling. Identity + target field + selector + response + strength.
PersistedCouplingResolver
The resolver for an archived PersistedCoupling
PersistedField
Persisted field. Identity + a JSON-encoded definition AST + extent + lifecycle.
PersistedFieldResolver
The resolver for an archived PersistedField

Enums§

ArchivedPersistedCouplingResponse
An archived PersistedCouplingResponse
ArchivedPersistedFieldExtent
An archived PersistedFieldExtent
ArchivedPersistedFieldLifecycle
An archived PersistedFieldLifecycle
ArchivedPersistedNodeSelector
An archived PersistedNodeSelector
PersistedCouplingResponse
How a coupling’s targets respond to its field (mirrors graph::CouplingResponse). The six force responses are the recognized core; Open carries the open-tail families by IRI. Not Copy (the Open variant owns a String).
PersistedCouplingResponseResolver
The resolver for an archived PersistedCouplingResponse
PersistedFieldExtent
Where a field applies (mirrors graph::FieldExtent). AttachedToNode stores the node UUID as a string, matching PersistedNode::node_id / PersistedEdge.
PersistedFieldExtentResolver
The resolver for an archived PersistedFieldExtent
PersistedFieldLifecycle
Field lifecycle state (mirrors graph::FieldLifecycle).
PersistedFieldLifecycleResolver
The resolver for an archived PersistedFieldLifecycle
PersistedNodeSelector
Which nodes a coupling targets (mirrors graph::NodeSelector).
PersistedNodeSelectorResolver
The resolver for an archived PersistedNodeSelector