#[non_exhaustive]pub struct UserSettings {Show 16 fields
pub theme: Option<String>,
pub symbol: Option<String>,
pub interval: Option<Timeframe>,
pub drawing_favorites: Vec<DrawingToolType>,
pub drawing_favorites_hidden: bool,
pub drawing_favorites_pos: Option<(f32, f32)>,
pub magnet_hint_dismissed: bool,
pub layout: Option<String>,
pub layout_autosave: bool,
pub layout_favorites: Vec<String>,
pub indicator_favorites: Vec<String>,
pub interval_favorites: Vec<Timeframe>,
pub drawing_defaults: BTreeMap<String, Value>,
pub watchlists: Vec<Watchlist>,
pub market_heatmap: MarketHeatmapSelection,
pub replay_session: Option<(ReplaySession, Timeframe)>,
}Expand description
What the library keeps of the user between sessions, in the StoreKind::Settings document
settings that SettingsStore reads and writes.
Build it with Default and assign fields: later releases add fields without a breaking change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.theme: Option<String>Name of the theme preset, as listed by presets.
symbol: Option<String>The symbol shown last.
interval: Option<Timeframe>The interval shown last.
drawing_favorites: Vec<DrawingToolType>The drawing tools on the drawing toolbar’s favourites bar, in order. A tool this release does not know is left out when reading.
Whether the user hid the favourites strip with its close or toggle button.
drawing_favorites_pos: Option<(f32, f32)>The top-left corner of the favourites strip, in logical points, where the user left it;
None until it has been shown, when it starts beside the drawing toolbar.
magnet_hint_dismissed: boolWhether the user dismissed the drawing toolbar’s card that explains the magnet; a document without it reads as not dismissed.
layout: Option<String>The layout open last, to open again on start.
layout_autosave: boolWhether the open layout is saved after each change.
layout_favorites: Vec<String>The names of the starred layouts.
indicator_favorites: Vec<String>Factory names of the starred studies of the indicator dialog, in order.
interval_favorites: Vec<Timeframe>The intervals starred in the interval menu, in order.
drawing_defaults: BTreeMap<String, Value>The properties each drawing tool starts with, keyed by tool, as the JSON of
its DrawingTemplate. A tool without an entry starts with
the built-in defaults.
watchlists: Vec<Watchlist>The watchlists, in order.
market_heatmap: MarketHeatmapSelectionThe market heatmap’s universe, size metric and colour metric.
replay_session: Option<(ReplaySession, Timeframe)>The replay position to resume, with the interval its history was fetched at.
Implementations§
Source§impl UserSettings
impl UserSettings
Trait Implementations§
Source§impl Clone for UserSettings
impl Clone for UserSettings
Source§fn clone(&self) -> UserSettings
fn clone(&self) -> UserSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UserSettings
impl Debug for UserSettings
Source§impl Default for UserSettings
impl Default for UserSettings
Source§fn default() -> UserSettings
fn default() -> UserSettings
Source§impl<'de> Deserialize<'de> for UserSettingswhere
UserSettings: Default,
impl<'de> Deserialize<'de> for UserSettingswhere
UserSettings: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for UserSettings
impl PartialEq for UserSettings
Source§impl Serialize for UserSettings
impl Serialize for UserSettings
impl StructuralPartialEq for UserSettings
Auto Trait Implementations§
impl Freeze for UserSettings
impl RefUnwindSafe for UserSettings
impl Send for UserSettings
impl Sync for UserSettings
impl Unpin for UserSettings
impl UnsafeUnpin for UserSettings
impl UnwindSafe for UserSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more