AppState

Struct AppState 

Source
pub struct AppState<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> AppState<'a>

Source

pub fn handle_input_mode(&mut self, key: KeyEvent) -> KeypressResult

Source

pub fn process_confirm_delete_char(&mut self, c: char)

Source

pub fn exit_input_mode(&mut self)

Source

pub fn handle_nav_action(&mut self, action: NavAction) -> KeypressResult

Source

pub fn handle_file_action(&mut self, action: FileAction) -> KeypressResult

Source

pub fn enter_input_mode( &mut self, mode: InputMode, prompt: String, initial: Option<String>, )

Source§

impl<'a> AppState<'a>

Source

pub fn new(config: &'a Config) -> Result<Self>

Source

pub fn config(&self) -> &Config

Source

pub fn metrics_mut(&mut self) -> &mut LayoutMetrics

Source

pub fn nav(&self) -> &NavState

Source

pub fn actions(&self) -> &ActionContext

Source

pub fn preview(&self) -> &PreviewState

Source

pub fn parent(&self) -> &ParentState

Source

pub fn notification_time(&self) -> &Option<Instant>

Source

pub fn visible_selected(&self) -> Option<usize>

Source

pub fn has_visible_entries(&self) -> bool

Source

pub fn tick(&mut self) -> bool

The heart of the app: updates state and handles worker messages

Source

pub fn handle_keypress(&mut self, key: KeyEvent) -> KeypressResult

Source

pub fn request_dir_load(&mut self, focus: Option<OsString>)

Source

pub fn request_preview(&mut self)

Source

pub fn request_parent_content(&mut self)

Auto Trait Implementations§

§

impl<'a> Freeze for AppState<'a>

§

impl<'a> RefUnwindSafe for AppState<'a>

§

impl<'a> Send for AppState<'a>

§

impl<'a> Sync for AppState<'a>

§

impl<'a> Unpin for AppState<'a>

§

impl<'a> UnwindSafe for AppState<'a>

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.