Skip to main content

AppState

Struct AppState 

Source
pub struct AppState {
Show 15 fields pub simulators: Vec<Simulator>, pub selected_index: i64, pub main_scroll_offset: i64, pub filter_query: String, pub is_filter_focused: bool, pub status_message: Option<String>, pub last_error: Option<String>, pub pending_operations: HashMap<Uuid, PendingOperation>, pub is_quitting: bool, pub rows: i64, pub cols: i64, pub recording_device_id: Option<Uuid>, pub recording_path: Option<PathBuf>, pub modal: Option<Modal>, pub url_history: Vec<String>,
}

Fields§

§simulators: Vec<Simulator>§selected_index: i64§main_scroll_offset: i64§filter_query: String§is_filter_focused: bool§status_message: Option<String>§last_error: Option<String>§pending_operations: HashMap<Uuid, PendingOperation>§is_quitting: bool§rows: i64§cols: i64§recording_device_id: Option<Uuid>§recording_path: Option<PathBuf>§modal: Option<Modal>§url_history: Vec<String>

Implementations§

Source§

impl AppState

Source

pub fn is_recording(&self) -> bool

Source

pub fn visible_simulators(&self) -> Vec<&Simulator>

Source

pub fn selected_simulator(&self) -> Option<&Simulator>

Source

pub fn main_list_viewport(&self) -> i64

Conservative count of simulator rows that fit. The view walks the list from main_scroll_offset and stops when body height is exhausted; the 2-line headroom leaves room for runtime-group headers without exact counting.

All modals except Appearance, ConfirmErase, and ConfirmDelete are rendered as floating popup overlays on top of the simulator list, so they do not consume any banner rows in the main layout.

Source

pub fn scroll(offset: i64, index: i64, viewport: i64) -> i64

Scroll-on-edge offset for a windowed list. Returns the new top-visible index given the current offset, the focused index, and the viewport.

Source

pub fn sort(simulators: Vec<Simulator>) -> Vec<Simulator>

Trait Implementations§

Source§

impl Clone for AppState

Source§

fn clone(&self) -> AppState

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 AppState

Source§

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

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

impl Default for AppState

Source§

fn default() -> Self

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

impl PartialEq for AppState

Source§

fn eq(&self, other: &AppState) -> 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 AppState

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.