pub struct App {Show 23 fields
pub mode: AppMode,
pub quit: bool,
pub focused_panel: FocusedPanel,
pub log_mode: bool,
pub modules_dir: PathBuf,
pub theme: Theme,
pub theme_locked: bool,
pub distro: String,
pub scripts: StatefulList<ScriptItem>,
pub categories: StatefulList<String>,
pub all_scripts: HashMap<String, Vec<ScriptItem>>,
pub script_panel_area: Rect,
pub preview: PreviewState,
pub search: SearchState,
pub multi_select: MultiSelectState,
pub help: HelpState,
pub description: DescriptionState,
pub run_script_popup: Option<RunScriptPopup>,
pub script_execution_queue: VecDeque<PathBuf>,
pub theme_selector: ThemeSelectorState,
pub needs_redraw: bool,
pub last_size: Rect,
pub log_path: Option<String>,
}Fields§
§mode: AppMode§quit: bool§focused_panel: FocusedPanel§log_mode: bool§modules_dir: PathBuf§theme: Theme§theme_locked: bool§distro: String§scripts: StatefulList<ScriptItem>§categories: StatefulList<String>§all_scripts: HashMap<String, Vec<ScriptItem>>§script_panel_area: Rect§preview: PreviewState§search: SearchState§multi_select: MultiSelectState§help: HelpState§description: DescriptionState§run_script_popup: Option<RunScriptPopup>§script_execution_queue: VecDeque<PathBuf>§theme_selector: ThemeSelectorState§needs_redraw: bool§last_size: Rect§log_path: Option<String>Implementations§
Source§impl App
impl App
pub fn load_scripts(&mut self, modules_dir: &Path) -> Result<()>
pub fn update_script_list(&mut self)
pub fn update_preview(&mut self)
pub fn toggle_preview_mode(&mut self)
pub fn scroll_preview_up(&mut self)
pub fn scroll_preview_down(&mut self)
pub fn scroll_preview_page_up(&mut self)
pub fn scroll_preview_page_down(&mut self)
pub fn get_script_path(&self) -> Option<PathBuf>
pub fn toggle_search_mode(&mut self)
pub fn perform_search(&mut self)
pub fn next(&mut self)
pub fn previous(&mut self)
pub fn update_autocomplete(&mut self)
pub fn toggle_multi_select_mode(&mut self)
pub fn toggle_script_selection(&mut self)
pub fn is_script_selected(&self, script_path: &Path) -> bool
pub fn has_description(&self, category: &str, script_name: &str) -> bool
pub fn toggle_help_mode(&mut self)
pub fn top(&mut self)
pub fn bottom(&mut self)
pub fn handle_key_root_warning_mode(&mut self, key: KeyEvent)
pub fn handle_key_termux_warning_mode(&mut self, key: KeyEvent)
Source§impl App
impl App
pub fn new(options: &UiOptions) -> App
pub fn toggle_description_popup(&mut self)
pub fn get_selected_script(&self) -> Option<&ScriptItem>
Source§impl App
impl App
pub fn handle_search_input(&mut self, key: KeyEvent)
pub fn handle_key_normal_mode(&mut self, key: KeyEvent)
pub fn handle_key_preview_mode(&mut self, key: KeyEvent)
pub fn handle_key_confirmation_mode(&mut self, key: KeyEvent)
pub fn handle_key_help_mode(&mut self, key: KeyEvent)
pub fn handle_key_description_mode(&mut self, key: KeyEvent)
pub fn toggle_theme_selector(&mut self)
pub fn handle_key_theme_selector_mode(&mut self, key: KeyEvent)
Auto Trait Implementations§
impl !Freeze for App
impl !RefUnwindSafe for App
impl !Sync for App
impl !UnwindSafe for App
impl Send for App
impl Unpin for App
impl UnsafeUnpin for App
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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 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> ⓘ
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