Skip to main content

murk_obs/
metadata.rs

1//! Observation metadata populated at execution time.
2
3use murk_core::{ParameterVersion, TickId, WorldGenerationId};
4
5/// Metadata accompanying an observation extraction.
6///
7/// Populated by [`ObsPlan::execute`](crate::ObsPlan::execute) from the
8/// snapshot being observed. All six fields are guaranteed to be set.
9#[derive(Clone, Debug, PartialEq)]
10pub struct ObsMetadata {
11    /// Tick at which the observed snapshot was produced.
12    pub tick_id: TickId,
13    /// Age of the snapshot relative to the current engine tick.
14    /// In Lockstep mode this is always 0. In RealtimeAsync it may
15    /// be > 0 if reading a stale snapshot.
16    pub age_ticks: u64,
17    /// Fraction of the observation tensor filled with valid data
18    /// (i.e., `valid_ratio` from the region plan).
19    pub coverage: f64,
20    /// Arena generation of the observed snapshot.
21    pub world_generation_id: WorldGenerationId,
22    /// Parameter version at the time of the snapshot.
23    pub parameter_version: ParameterVersion,
24}