Skip to main content

App

Struct App 

Source
pub struct App { /* private fields */ }

Implementations§

Source§

impl App

Source

pub fn new( entries: Vec<Entry>, family: ShellFamily, stats: Stats, library: PathBuf, history: Vec<String>, now: i64, ) -> Result<Self>

Source

pub fn query(&self) -> &str

Source

pub fn mode(&self) -> &Mode

Source

pub fn status(&self) -> Option<&str>

Source

pub fn selected(&self) -> usize

Source

pub fn matches(&self) -> usize

Source

pub fn rows(&self) -> impl Iterator<Item = Row<'_>>

The entries currently on offer, best first.

Source

pub fn selected_row(&self) -> Option<Row<'_>>

Source

pub fn highlight(&self, haystack: &str) -> Vec<u32>

Highlights the query inside a haystack for the rows on screen.

Source

pub fn on_key(&mut self, key: KeyEvent) -> Result<Option<Outcome>>

Source

pub fn is_saved(&self, command: &str) -> bool

Whether the library already holds exactly this command for this shell.

Source

pub fn save_tags(&self) -> Vec<String>

Tags the entry being saved would get, for showing before it is saved.

Source

pub fn notice(&mut self, message: String)

Shows message where the hints go until the first key is pressed.

Source

pub fn changed(&self) -> bool

Whether anything in the library was written while the picker was open.

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> 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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.