Skip to main content

egui_charts/model/
replay.rs

1//! A replay checkpoint as plain data, for the settings store and the host's storage.
2
3use chrono::{DateTime, Utc};
4use serde::{Deserialize, Serialize};
5
6/// A resumable position in host-supplied history. Store it with the symbol's source interval
7/// and fetch that same source before restoring it. Restoring always pauses playback.
8#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9pub struct ReplaySession {
10    /// Source symbol, checked before restoration.
11    pub symbol: String,
12    /// Opening time of the last revealed source bar.
13    pub time: DateTime<Utc>,
14    /// Playback speed multiplier, validated when restoring.
15    pub speed: f32,
16}