InteractiveMode

Struct InteractiveMode 

Source
pub struct InteractiveMode {
    pub current_mode: ApplicationMode,
    pub config_focus: Option<ConfigurationField>,
    pub array_view_algorithm: usize,
    pub help_visible: bool,
    /* private fields */
}
Expand description

Interactive mode state management

Fields§

§current_mode: ApplicationMode

Current application mode

§config_focus: Option<ConfigurationField>

Current configuration focus (None means main menu)

§array_view_algorithm: usize

Currently selected algorithm for array visualization

§help_visible: bool

Whether help overlay is visible

Implementations§

Source§

impl InteractiveMode

Source

pub fn new() -> Self

Create a new interactive mode

Source

pub fn get_current_config(&self) -> &ConfigurationState

Get current configuration

Source

pub fn set_config(&mut self, config: ConfigurationState)

Set configuration

Source

pub fn is_configuration_mode(&self) -> bool

Check if currently in configuration mode

Source

pub fn is_race_active(&self) -> bool

Check if race is currently active

Source

pub fn is_race_paused(&self) -> bool

Check if race is paused

Source

pub fn is_race_complete(&self) -> bool

Check if race is complete

Source

pub fn is_race_timer_active(&self) -> bool

Check if race timer is active

Source

pub fn is_race_timer_paused(&self) -> bool

Check if race timer is paused

Source

pub fn is_menu_visible(&self) -> bool

Check if menu is currently visible

Source

pub fn should_show_help_overlay(&self) -> bool

Check if help overlay should be shown

Source

pub fn should_update_display(&self) -> bool

Check if display needs update

Source

pub fn has_selection_changed(&self) -> bool

Check if selection has changed (for visual feedback)

Source

pub fn is_error_message_visible(&self) -> bool

Check if error message is visible

Source

pub fn get_error_message(&self) -> Option<&str>

Get current error message

Source

pub fn clear_error_message(&mut self)

Clear error message

Source

pub fn set_error_message(&mut self, message: String)

Set error message

Source

pub fn get_race_elapsed_time(&self) -> Option<Duration>

Get race elapsed time

Source

pub fn get_race_start_time(&self) -> Option<Instant>

Get race start time

Source

pub fn transition_to_configuration(&mut self) -> Result<()>

Transition to Configuration mode

Source

pub fn transition_to_racing(&mut self) -> Result<()>

Transition to Racing mode

Source

pub fn transition_to_paused(&mut self) -> Result<()>

Transition to Paused mode

Source

pub fn transition_to_complete(&mut self) -> Result<()>

Transition to Complete mode

Source

pub fn set_config_focus(&mut self, field: ConfigurationField) -> Result<()>

Set configuration focus

Source

pub fn clear_config_focus(&mut self)

Clear configuration focus (return to main menu)

Source

pub fn toggle_help(&mut self)

Toggle help visibility

Source

pub fn set_array_view_algorithm(&mut self, algorithm_index: usize)

Set array view algorithm

Source

pub fn cycle_array_view_algorithm(&mut self, algorithm_count: usize)

Cycle to next array view algorithm

Source

pub fn mark_display_updated(&mut self)

Mark display as updated

Source

pub fn set_array_size_interactive(&mut self, size: u32) -> Result<()>

Set array size interactively

Source

pub fn attempt_set_array_size(&mut self, size: u32) -> bool

Attempt to set array size with error handling

Source

pub fn set_distribution_interactive(&mut self, distribution: DistributionType)

Set distribution interactively

Source

pub fn set_fairness_mode_interactive(&mut self, mode: FairnessMode)

Set fairness mode interactively

Source

pub fn set_budget_parameter(&mut self, budget: u32) -> Result<()>

Set budget parameter

Source

pub fn get_help_overlay_content(&self) -> String

Get help overlay content

Trait Implementations§

Source§

impl Clone for InteractiveMode

Source§

fn clone(&self) -> InteractiveMode

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for InteractiveMode

Source§

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

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

impl Default for InteractiveMode

Source§

fn default() -> Self

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

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V