1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Trading symbol identification.
//!
//! A lightweight symbol handle used throughout the chart engine to identify
//! which financial instrument is being displayed or subscribed to.
/// Represents a trading symbol (financial instrument identifier).
///
/// A `Symbol` is the canonical way to reference a tradable instrument in the chart
/// engine. It pairs a machine-readable `name` (e.g. `"BTCUSDT"`, `"AAPL"`) with a
/// human-readable `display_name` (e.g. `"Bitcoin / Tether"`, `"Apple Inc."`).
///
/// The `active` flag indicates whether the symbol is currently subscribed to a
/// live data feed. Symbols default to active on creation.
///
/// # Example
///
/// ```
/// use egui_charts::model::Symbol;
///
/// let sym = Symbol::new("BTCUSDT", "Bitcoin / Tether");
/// assert_eq!(sym.name, "BTCUSDT");
/// assert!(sym.active);
/// ```