SnapshotAccess

Trait SnapshotAccess 

Source
pub trait SnapshotAccess {
    // Required methods
    fn read_field(&self, field: FieldId) -> Option<&[f32]>;
    fn tick_id(&self) -> TickId;
    fn world_generation_id(&self) -> WorldGenerationId;
    fn parameter_version(&self) -> ParameterVersion;
}
Expand description

Read-only access to a published snapshot.

This trait decouples observation extraction (ObsPlan) from the arena implementation. ObsPlan reads through &dyn SnapshotAccess rather than referencing ReadArena directly (Decision N).

Required Methods§

Source

fn read_field(&self, field: FieldId) -> Option<&[f32]>

Read field data from the snapshot.

Returns None if the field ID is invalid or not present.

Source

fn tick_id(&self) -> TickId

The tick at which this snapshot was produced.

Source

fn world_generation_id(&self) -> WorldGenerationId

The arena generation of this snapshot.

Source

fn parameter_version(&self) -> ParameterVersion

The parameter version at the time of this snapshot.

Implementors§