CellSnapshot class

A serialisable projection of one cell's identity and current value.

When to use

As the atom of CellGraphSnapshot: one CellSnapshot per registered cell. Its configFingerprint is the SHA-256 of the cell's receptor name + version, its test rule, and its context — the three things that determine whether a replay of the same pulse sequence will produce the same result.

How it works

The snapshot stores the graph-scoped id, the configFingerprint, the receptor's version string, the current value (JSON-encoded), and any extras carried from the nucleus. toJson/fromJson round-trip the record unchanged.

See also:

Constructors

CellSnapshot({required String id, required String configFingerprint, required String receptorVersion, required Object? value, Map<String, Object?> extras = const {}})
Creates a CellSnapshot.
const
CellSnapshot.fromJson(Map<String, Object?> json)
Reconstructs a CellSnapshot from toJson's output.
factory

Properties

configFingerprint → String
SHA-256 fingerprint of the cell's receptor, rule, and context.
final
extras → Map<String, Object?>
Additional per-cell metadata (custom user fields, mirror the Nucleus.user record). Preserved verbatim.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable, graph-scoped cell identifier. Assigned by CellGraph.register (graph registration). For standalone use, callers may supply a manual id, or the snapshot captures cell.id (see Cell.id), which falls back to nucleus:<hex> when no graph has registered the cell.
final
receptorVersion → String
The receptor's stable version string (see Receptor.version). Empty for the framework's built-in receptors until graph registration stamps them.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → Object?
Current value, JSON-encoded. The shape matches whatever the cell's payload type produces; a snapshot does not know the type.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Serialises this snapshot to a canonical JSON map.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited