pub struct AppState {
pub input_nonempty: bool,
pub task_running: bool,
pub modal_open: bool,
pub view_overlay: bool,
}Expand description
Runtime state flags that affect keybinding resolution.
These flags are queried at the moment a key event is resolved to an action. The priority of actions changes based on these flags per the policy spec.
Fields§
§input_nonempty: boolTrue if the text input buffer contains characters.
task_running: boolTrue if a background task/command is executing.
modal_open: boolTrue if a modal dialog or overlay is visible.
view_overlay: boolTrue if a secondary view (tree, debug, HUD) is active.
Implementations§
Source§impl AppState
impl AppState
Sourcepub const fn with_input(self, nonempty: bool) -> Self
pub const fn with_input(self, nonempty: bool) -> Self
Set input_nonempty flag.
Sourcepub const fn with_modal(self, open: bool) -> Self
pub const fn with_modal(self, open: bool) -> Self
Set modal_open flag.
Sourcepub const fn with_overlay(self, active: bool) -> Self
pub const fn with_overlay(self, active: bool) -> Self
Set view_overlay flag.
Trait Implementations§
impl Copy for AppState
impl Eq for AppState
impl StructuralPartialEq for AppState
Auto Trait Implementations§
impl Freeze for AppState
impl RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnwindSafe for AppState
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