pub trait ChartAppState {
// Required methods
fn active_symbol(&self) -> &str;
fn active_timeframe(&self) -> &Timeframe;
fn chart_type(&self) -> ChartType;
fn is_connected(&self) -> bool;
fn is_replay_active(&self) -> bool;
}Expand description
Trait for application state that chart UI components can read from.
Library consumers implement this on their app state type to connect the UI components to their data layer.
Required Methods§
Sourcefn active_symbol(&self) -> &str
fn active_symbol(&self) -> &str
Currently active trading symbol (e.g., “AAPL”, “BTC/USD”).
Sourcefn active_timeframe(&self) -> &Timeframe
fn active_timeframe(&self) -> &Timeframe
Current chart timeframe.
Sourcefn chart_type(&self) -> ChartType
fn chart_type(&self) -> ChartType
Current chart visualization type.
Sourcefn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Whether the data connection is active.
Sourcefn is_replay_active(&self) -> bool
fn is_replay_active(&self) -> bool
Whether replay mode is active.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".