pub struct App {
pub tree: Tree,
pub state: TreeListViewState<NodeId>,
pub query: TreeQuery,
pub mode: Mode,
pub keybinding_panel: KeybindingPanelState,
pub page_height: usize,
pub palette: Option<Palette>,
/* private fields */
}Fields§
§tree: Tree§state: TreeListViewState<NodeId>§query: TreeQuery§mode: ModeThe current input mode; see Mode.
keybinding_panel: KeybindingPanelState§page_height: usizeRows per screen; the UI updates this every frame.
palette: Option<Palette>Terminal default colors, when the terminal answered the startup query.
Implementations§
Source§impl App
impl App
pub fn new(tree: Tree, config: &Config, expand: Option<ExpandSpec>) -> Self
Sourcepub fn default_keymap() -> HashMap<Key, Binding>
pub fn default_keymap() -> HashMap<Key, Binding>
The default keybindings, before user config is merged.
pub fn focused_id(&mut self) -> Option<NodeId>
Sourcepub fn visible_names(&mut self) -> Vec<String>
pub fn visible_names(&mut self) -> Vec<String>
Names of currently visible rows, in on-screen order.
Sourcepub fn handle_key(&mut self, key: Key) -> Effect
pub fn handle_key(&mut self, key: Key) -> Effect
Handle a normalized key through the active mode and effective keymap.
Sourcepub fn run_command(&mut self, cmd: AppCommand) -> Effect
pub fn run_command(&mut self, cmd: AppCommand) -> Effect
Execute an app command.
Sourcepub fn do_work(&mut self) -> bool
pub fn do_work(&mut self) -> bool
One cooperative quantum of index building, run by the event loop between input polls: load what is on screen first, then advance the arena-order sweep. Returns true while more work remains. This is the background indexer — cooperative rather than threaded, so the tree stays single-threaded and lock-free; a worker thread could later slot in behind this same seam.
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl UnwindSafe 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> 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