Skip to main content

App

Struct App 

Source
pub struct App {
Show 23 fields pub query: String, pub all_entries: Vec<TryEntry>, pub filtered_entries: Vec<TryEntry>, pub selected_index: usize, pub should_quit: bool, pub final_selection: SelectionResult, pub mode: AppMode, pub status_message: Option<String>, pub base_path: PathBuf, pub theme: Theme, pub editor_cmd: Option<String>, pub wants_editor: bool, pub apply_date_prefix: Option<bool>, pub transparent_background: bool, pub show_new_option: bool, pub available_themes: Vec<Theme>, pub theme_list_state: ListState, pub original_theme: Option<Theme>, pub original_transparent_background: Option<bool>, pub config_path: Option<PathBuf>, pub config_location_state: ListState, pub cached_free_space_mb: Option<u64>, pub folder_size_mb: Arc<AtomicU64>,
}

Fields§

§query: String§all_entries: Vec<TryEntry>§filtered_entries: Vec<TryEntry>§selected_index: usize§should_quit: bool§final_selection: SelectionResult§mode: AppMode§status_message: Option<String>§base_path: PathBuf§theme: Theme§editor_cmd: Option<String>§wants_editor: bool§apply_date_prefix: Option<bool>§transparent_background: bool§show_new_option: bool§available_themes: Vec<Theme>§theme_list_state: ListState§original_theme: Option<Theme>§original_transparent_background: Option<bool>§config_path: Option<PathBuf>§config_location_state: ListState§cached_free_space_mb: Option<u64>§folder_size_mb: Arc<AtomicU64>

Implementations§

Source§

impl App

Source

pub fn new( path: PathBuf, theme: Theme, editor_cmd: Option<String>, config_path: Option<PathBuf>, apply_date_prefix: Option<bool>, transparent_background: bool, query: Option<String>, ) -> Self

Source

pub fn has_exact_match(&self) -> bool

Source

pub fn delete_selected(&mut self)

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.