pub struct TopToolbarState {
pub replay_active: bool,
pub can_undo: bool,
pub can_redo: bool,
pub can_publish_image: bool,
pub can_trade: bool,
}Expand description
Replay and action availability shared with the host.
Symbol, interval and chart style come from the host’s
ChartAppState.
Fields§
§replay_active: boolWhether replay mode is active
can_undo: boolWhether there is an action to undo; the undo button is disabled while this is false.
can_redo: boolWhether there is an undone action to redo; the redo button is disabled while this is false.
can_publish_image: boolWhether the host can publish a captured image and return its shareable link.
Enables the Publish button and Copy link and Post image in the snapshot menu. Handle
TopToolbarAction::CopyImageLink and
TopToolbarAction::Publish through that service.
can_trade: boolWhether a broker is attached; the Trade button is hidden while this is false.
Implementations§
Source§impl TopToolbarState
impl TopToolbarState
Sourcepub fn toggle_replay(&mut self)
pub fn toggle_replay(&mut self)
Toggle replay mode
Sourcepub fn sync_from_app_state(&mut self, app_state: &dyn ChartAppState)
pub fn sync_from_app_state(&mut self, app_state: &dyn ChartAppState)
Sync from application state.
Trait Implementations§
Source§impl Clone for TopToolbarState
impl Clone for TopToolbarState
Source§fn clone(&self) -> TopToolbarState
fn clone(&self) -> TopToolbarState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TopToolbarState
impl Debug for TopToolbarState
Auto Trait Implementations§
impl Freeze for TopToolbarState
impl RefUnwindSafe for TopToolbarState
impl Send for TopToolbarState
impl Sync for TopToolbarState
impl Unpin for TopToolbarState
impl UnsafeUnpin for TopToolbarState
impl UnwindSafe for TopToolbarState
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
Mutably borrows from an owned value. Read more
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,
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> ⓘ
Converts
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> ⓘ
Converts
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