Skip to main content

ReplayAction

Enum ReplayAction 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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

§symbol: String

Instrument identifier used by the host.

§start: Option<DateTime<Utc>>

Start time of the requested range, when specified.

§end: Option<DateTime<Utc>>

End time of the requested range, when specified.

§

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

§start: DateTime<Utc>

Start time of the requested range.

§end: DateTime<Utc>

End time of the requested range.

§

AddMarker

Add marker at current position

Fields

§label: Option<String>

Optional label for the replay marker.

§color: Option<[u8; 4]>

Optional RGBA color for the replay marker.

§

RemoveMarker(usize)

Remove marker at bar index

§

ClearMarkers

Clear all markers

Implementations§

Source§

impl ReplayAction

Source

pub fn affects_playback(&self) -> bool

Check if this action affects playback state

Source

pub fn affects_pos(&self) -> bool

Check if this action affects position

Source

pub fn affects_mode(&self) -> bool

Check if this action affects mode

Trait Implementations§

Source§

impl Clone for ReplayAction

Source§

fn clone(&self) -> ReplayAction

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReplayAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ReplayAction

Source§

fn default() -> ReplayAction

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ReplayAction

Source§

fn eq(&self, other: &ReplayAction) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ReplayAction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> MaybeSend for T
where T: Send + Sync + ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.