pub trait TemporalAccess: Send + Sync {
// Required methods
fn view_epoch(&self) -> ViewEpoch;
fn track_count(&self) -> usize;
fn track_ids(&self) -> Vec<TrackId>;
fn get_track(&self, id: &TrackId) -> Option<&Track>;
fn recent_observations(&self, id: &TrackId) -> &[TrackObservation];
fn first_seen(&self, id: &TrackId) -> Option<MonotonicTs>;
fn last_seen(&self, id: &TrackId) -> Option<MonotonicTs>;
fn trajectory_point_count(&self, id: &TrackId) -> usize;
fn trajectory_segment_count(&self, id: &TrackId) -> usize;
}Expand description
Read-only access to temporal state for stages.
Implemented by nv_temporal::TemporalStoreSnapshot. The runtime passes
a &dyn TemporalAccess through StageContext::temporal.
Stages that need track history, observation windows, or view-epoch context program against this trait, keeping them decoupled from the concrete temporal store implementation.
Required Methods§
Sourcefn view_epoch(&self) -> ViewEpoch
fn view_epoch(&self) -> ViewEpoch
View epoch at the time this snapshot was taken.
Sourcefn track_count(&self) -> usize
fn track_count(&self) -> usize
Number of tracks in the snapshot.
Sourcefn track_ids(&self) -> Vec<TrackId>
fn track_ids(&self) -> Vec<TrackId>
All track IDs in the snapshot.
The order is unspecified. Callers that need a stable iteration order should collect and sort.
Sourcefn get_track(&self, id: &TrackId) -> Option<&Track>
fn get_track(&self, id: &TrackId) -> Option<&Track>
Look up a track’s current state by ID.
Returns None if the track is not present in the snapshot.
Sourcefn recent_observations(&self, id: &TrackId) -> &[TrackObservation]
fn recent_observations(&self, id: &TrackId) -> &[TrackObservation]
Return the most recent observations for a track, ordered oldest-first.
Returns an empty slice if the track is not present or has no recorded observations.
Sourcefn first_seen(&self, id: &TrackId) -> Option<MonotonicTs>
fn first_seen(&self, id: &TrackId) -> Option<MonotonicTs>
Timestamp when a track was first seen.
Returns None if the track is not present.
Sourcefn last_seen(&self, id: &TrackId) -> Option<MonotonicTs>
fn last_seen(&self, id: &TrackId) -> Option<MonotonicTs>
Timestamp of the most recent observation for a track.
Returns None if the track is not present.
Sourcefn trajectory_point_count(&self, id: &TrackId) -> usize
fn trajectory_point_count(&self, id: &TrackId) -> usize
Total trajectory points for a track across all segments.
Returns 0 if the track is not present.
Sourcefn trajectory_segment_count(&self, id: &TrackId) -> usize
fn trajectory_segment_count(&self, id: &TrackId) -> usize
Number of trajectory segments for a track.
Returns 0 if the track is not present.