#[non_exhaustive]pub enum ReplayAction {
Show 29 variants
None,
Play,
Pause,
TogglePlayPause,
Stop,
Reset,
StepForward,
StepBackward,
StepForwardN(usize),
StepBackwardN(usize),
JumpToBar(usize),
JumpToDate(DateTime<Utc>),
JumpToStart,
JumpToEnd,
JumpToPercent(f32),
SetSpeed(f32),
SpeedUp,
SlowDown,
EnterReplayMode,
ExitReplayMode,
ToggleReplayMode,
LoadData {
symbol: String,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
},
UnloadData,
SetStartDate(DateTime<Utc>),
SetEndDate(DateTime<Utc>),
SetDateRange {
start: DateTime<Utc>,
end: DateTime<Utc>,
},
AddMarker {
label: Option<String>,
color: Option<[u8; 4]>,
},
RemoveMarker(usize),
ClearMarkers,
}Expand description
Actions that can be performed during replay mode
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
No action
Play
Start playing from current position
Pause
Pause playback
TogglePlayPause
Toggle play/pause
Stop
Stop playback and reset to beginning
Reset
Reset to initial state without stopping mode
StepForward
Move forward one bar
StepBackward
Move backward one bar
StepForwardN(usize)
Move forward by specified number of bars
StepBackwardN(usize)
Move backward by specified number of bars
JumpToBar(usize)
Jump to specific bar index (0-based)
JumpToDate(DateTime<Utc>)
Jump to specific date/time
JumpToStart
Jump to beginning
JumpToEnd
Jump to end
JumpToPercent(f32)
Jump to percentage position (0.0 - 1.0)
SetSpeed(f32)
Set playback speed multiplier (0.1x - 100x)
SpeedUp
Increase speed by one preset level
SlowDown
Decrease speed by one preset level
EnterReplayMode
Enter replay mode
ExitReplayMode
Exit replay mode
ToggleReplayMode
Toggle replay mode on/off
LoadData
Load replay data from source
Fields
UnloadData
Unload current replay data
SetStartDate(DateTime<Utc>)
Set replay start date
SetEndDate(DateTime<Utc>)
Set replay end date
SetDateRange
Set both start and end dates
Fields
AddMarker
Add marker at current position
Fields
RemoveMarker(usize)
Remove marker at bar index
ClearMarkers
Clear all markers
Implementations§
Source§impl ReplayAction
impl ReplayAction
Sourcepub fn affects_playback(&self) -> bool
pub fn affects_playback(&self) -> bool
Check if this action affects playback state
Sourcepub fn affects_pos(&self) -> bool
pub fn affects_pos(&self) -> bool
Check if this action affects position
Sourcepub fn affects_mode(&self) -> bool
pub fn affects_mode(&self) -> bool
Check if this action affects mode
Trait Implementations§
Source§impl Clone for ReplayAction
impl Clone for ReplayAction
Source§fn clone(&self) -> ReplayAction
fn clone(&self) -> ReplayAction
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 ReplayAction
impl Debug for ReplayAction
Source§impl Default for ReplayAction
impl Default for ReplayAction
Source§fn default() -> ReplayAction
fn default() -> ReplayAction
Source§impl PartialEq for ReplayAction
impl PartialEq for ReplayAction
impl StructuralPartialEq for ReplayAction
Auto Trait Implementations§
impl Freeze for ReplayAction
impl RefUnwindSafe for ReplayAction
impl Send for ReplayAction
impl Sync for ReplayAction
impl Unpin for ReplayAction
impl UnsafeUnpin for ReplayAction
impl UnwindSafe for ReplayAction
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,
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