pub enum Menu {
InputCompleted(InputCompleted),
InputSimple(InputSimple),
Navigate(Navigate),
NeedConfirmation(NeedConfirmation),
Nothing,
}Expand description
Different “menu” mode in which the application can be. It dictates the reaction to event and is displayed in the bottom window.
Variants§
InputCompleted(InputCompleted)
Do something that may be completed Completion may come from :
- executable in $PATH,
- current directory or tree,
- directory in your file system,
- known actions. See
crate::event::EventAction,
InputSimple(InputSimple)
Do something that need typing :
- renaming a file or directory,
- creating a file or directory,
- typing a password (won’t be displayed, will be dropped ASAP)
Select something in a list and act on it
NeedConfirmation(NeedConfirmation)
Confirmation is required before modification is made to existing files : delete, move, copy
Nothing
No action is currently performed
Implementations§
Source§impl Menu
impl Menu
Sourcepub fn show_cursor(&self) -> bool
pub fn show_cursor(&self) -> bool
Does this mode requires a cursor ?
pub fn binds_per_mode(&self) -> &'static str
Sourcepub fn is_nothing(&self) -> bool
pub fn is_nothing(&self) -> bool
True if the edit mode is “Nothing” aka no menu is opened in this tab.
pub fn is_input(&self) -> bool
Trait Implementations§
Source§impl CursorOffset for Menu
impl CursorOffset for Menu
Source§fn cursor_offset(&self) -> u16
fn cursor_offset(&self) -> u16
Constant offset for the cursor. In any mode, we display the mode used and then the cursor if needed.
Source§impl Leave for Menu
impl Leave for Menu
Source§fn must_refresh(&self) -> bool
fn must_refresh(&self) -> bool
Should the file content & window be refreshed when leaving this mode?
Source§fn must_reset_mode(&self) -> bool
fn must_reset_mode(&self) -> bool
Should the edit mode be reset to Nothing when leaving this mode ?
Source§impl LineDisplay for Menu
impl LineDisplay for Menu
Source§impl SecondLine for Menu
impl SecondLine for Menu
Source§fn second_line(&self) -> &'static str
fn second_line(&self) -> &'static str
Line describing the mode and its custom keybinds
impl Copy for Menu
impl Eq for Menu
impl StructuralPartialEq for Menu
Auto Trait Implementations§
impl Freeze for Menu
impl RefUnwindSafe for Menu
impl Send for Menu
impl Sync for Menu
impl Unpin for Menu
impl UnwindSafe for Menu
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.