pub struct App { /* private fields */ }Implementations§
Source§impl App
impl App
pub fn new( entries: Vec<Entry>, family: ShellFamily, stats: Stats, library: PathBuf, history: Vec<String>, now: i64, ) -> Result<Self>
pub fn query(&self) -> &str
pub fn mode(&self) -> &Mode
pub fn status(&self) -> Option<&str>
pub fn selected(&self) -> usize
pub fn matches(&self) -> usize
Sourcepub fn rows(&self) -> impl Iterator<Item = Row<'_>>
pub fn rows(&self) -> impl Iterator<Item = Row<'_>>
The entries currently on offer, best first.
pub fn selected_row(&self) -> Option<Row<'_>>
Sourcepub fn highlight(&self, haystack: &str) -> Vec<u32>
pub fn highlight(&self, haystack: &str) -> Vec<u32>
Highlights the query inside a haystack for the rows on screen.
pub fn on_key(&mut self, key: KeyEvent) -> Result<Option<Outcome>>
Sourcepub fn is_saved(&self, command: &str) -> bool
pub fn is_saved(&self, command: &str) -> bool
Whether the library already holds exactly this command for this shell.
Tags the entry being saved would get, for showing before it is saved.
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> 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