#[non_exhaustive]pub enum Action<I: ApplicationInfo = EmptyInfo> {
Show 17 variants
NoOp,
Editor(EditorAction),
Macro(MacroAction),
Jump(PositionList, MoveDir1D, Count),
Repeat(RepeatType),
Scroll(ScrollStyle),
KeywordLookup,
RedrawScreen,
ShowInfoMessage(InfoMessage),
Suspend,
Search(MoveDirMod, Count),
Command(CommandAction),
CommandBar(CommandBarAction),
Prompt(PromptAction),
Tab(TabAction<I>),
Window(WindowAction<I>),
Application(I::Action),
}
Expand description
The result of either pressing a complete keybinding sequence, or parsing a command.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoOp
Do nothing.
Editor(EditorAction)
Perform an editor action.
Macro(MacroAction)
Perform a macro-related action.
Jump(PositionList, MoveDir1D, Count)
Navigate through the cursor positions in the specified list.
If the current window cannot satisfy the given Count, then this may jump to other windows.
Repeat(RepeatType)
Repeat an action sequence with the current context.
Scroll(ScrollStyle)
Scroll the viewport in the specified manner.
KeywordLookup
Lookup the keyword under the cursor.
RedrawScreen
Redraw the screen.
ShowInfoMessage(InfoMessage)
Show an InfoMessage.
Suspend
Suspend the process.
Search(MoveDirMod, Count)
Find the nth occurrence of the current application-level search.
Command(CommandAction)
Perform a command-related action.
CommandBar(CommandBarAction)
Perform a command bar-related action.
Prompt(PromptAction)
Perform a prompt-related action.
Tab(TabAction<I>)
Perform a tab-related action.
Window(WindowAction<I>)
Perform a window-related action.
Application(I::Action)
Application-specific command.
Implementations§
source§impl<I: ApplicationInfo> Action<I>
impl<I: ApplicationInfo> Action<I>
sourcepub fn is_edit_sequence(
&self,
motion: SequenceStatus,
ctx: &EditContext
) -> SequenceStatus
pub fn is_edit_sequence( &self, motion: SequenceStatus, ctx: &EditContext ) -> SequenceStatus
Indicates how an action gets included in RepeatType::EditSequence.
motion
indicates what to do with EditAction::Motion.
sourcepub fn is_last_action(&self, ctx: &EditContext) -> SequenceStatus
pub fn is_last_action(&self, ctx: &EditContext) -> SequenceStatus
Indicates how an action gets included in RepeatType::LastAction.
sourcepub fn is_last_selection(&self, ctx: &EditContext) -> SequenceStatus
pub fn is_last_selection(&self, ctx: &EditContext) -> SequenceStatus
Indicates how an action gets included in RepeatType::LastSelection.
sourcepub fn is_switchable(&self, ctx: &EditContext) -> bool
pub fn is_switchable(&self, ctx: &EditContext) -> bool
Returns true if this Action is allowed to trigger a WindowAction::Switch after an error.
Trait Implementations§
source§impl<K, I> BindingMachine<K, Action<I>, RepeatType, EditContext> for MixedBindings<K, I>where
K: InputKey,
I: ApplicationInfo,
InputStep<I>: Step<K, A = Action<I>, Sequence = RepeatType, State = EmacsState<I>>,
InputStep<I>: Step<K, A = Action<I>, Sequence = RepeatType, State = VimState<I>>,
impl<K, I> BindingMachine<K, Action<I>, RepeatType, EditContext> for MixedBindings<K, I>where
K: InputKey,
I: ApplicationInfo,
InputStep<I>: Step<K, A = Action<I>, Sequence = RepeatType, State = EmacsState<I>>,
InputStep<I>: Step<K, A = Action<I>, Sequence = RepeatType, State = VimState<I>>,
source§fn pop(&mut self) -> Option<(Action<I>, EditContext)>
fn pop(&mut self) -> Option<(Action<I>, EditContext)>
source§fn context(&mut self) -> EditContext
fn context(&mut self) -> EditContext
source§fn show_dialog(&mut self, max_rows: usize, max_cols: usize) -> Vec<Cow<'_, str>>
fn show_dialog(&mut self, max_rows: usize, max_cols: usize) -> Vec<Cow<'_, str>>
source§fn show_mode(&self) -> Option<String>
fn show_mode(&self) -> Option<String>
source§fn get_cursor_indicator(&self) -> Option<char>
fn get_cursor_indicator(&self) -> Option<char>
source§fn repeat(&mut self, rt: RepeatType, other: Option<EditContext>)
fn repeat(&mut self, rt: RepeatType, other: Option<EditContext>)
source§impl<I: ApplicationInfo> Default for Action<I>
impl<I: ApplicationInfo> Default for Action<I>
source§impl<I: ApplicationInfo> From<CommandAction> for Action<I>
impl<I: ApplicationInfo> From<CommandAction> for Action<I>
source§fn from(act: CommandAction) -> Self
fn from(act: CommandAction) -> Self
source§impl<I: ApplicationInfo> From<CommandBarAction> for Action<I>
impl<I: ApplicationInfo> From<CommandBarAction> for Action<I>
source§fn from(act: CommandBarAction) -> Self
fn from(act: CommandBarAction) -> Self
source§impl<I: ApplicationInfo> From<CursorAction> for Action<I>
impl<I: ApplicationInfo> From<CursorAction> for Action<I>
source§fn from(act: CursorAction) -> Self
fn from(act: CursorAction) -> Self
source§impl<I: ApplicationInfo> From<EditorAction> for Action<I>
impl<I: ApplicationInfo> From<EditorAction> for Action<I>
source§fn from(act: EditorAction) -> Self
fn from(act: EditorAction) -> Self
source§impl<I: ApplicationInfo> From<HistoryAction> for Action<I>
impl<I: ApplicationInfo> From<HistoryAction> for Action<I>
source§fn from(act: HistoryAction) -> Self
fn from(act: HistoryAction) -> Self
source§impl<I: ApplicationInfo> From<InsertTextAction> for Action<I>
impl<I: ApplicationInfo> From<InsertTextAction> for Action<I>
source§fn from(act: InsertTextAction) -> Self
fn from(act: InsertTextAction) -> Self
source§impl<I: ApplicationInfo> From<MacroAction> for Action<I>
impl<I: ApplicationInfo> From<MacroAction> for Action<I>
source§fn from(act: MacroAction) -> Self
fn from(act: MacroAction) -> Self
source§impl<I: ApplicationInfo> From<PromptAction> for Action<I>
impl<I: ApplicationInfo> From<PromptAction> for Action<I>
source§fn from(act: PromptAction) -> Self
fn from(act: PromptAction) -> Self
source§impl<I: ApplicationInfo> From<SelectionAction> for Action<I>
impl<I: ApplicationInfo> From<SelectionAction> for Action<I>
source§fn from(act: SelectionAction) -> Self
fn from(act: SelectionAction) -> Self
source§impl<I: ApplicationInfo> From<WindowAction<I>> for Action<I>
impl<I: ApplicationInfo> From<WindowAction<I>> for Action<I>
source§fn from(act: WindowAction<I>) -> Self
fn from(act: WindowAction<I>) -> Self
source§impl<I: ApplicationInfo> Mode<Action<I>, EmacsState<I>> for EmacsMode
impl<I: ApplicationInfo> Mode<Action<I>, EmacsState<I>> for EmacsMode
source§impl<I: ApplicationInfo> ModeKeys<TerminalKey, Action<I>, EmacsState<I>> for EmacsMode
impl<I: ApplicationInfo> ModeKeys<TerminalKey, Action<I>, EmacsState<I>> for EmacsMode
source§fn unmapped(
&self,
ke: &TerminalKey,
ctx: &mut EmacsState<I>
) -> (Vec<Action<I>>, Option<Self>)
fn unmapped( &self, ke: &TerminalKey, ctx: &mut EmacsState<I> ) -> (Vec<Action<I>>, Option<Self>)
source§impl<I: ApplicationInfo> ModeKeys<TerminalKey, Action<I>, VimState<I>> for VimMode
impl<I: ApplicationInfo> ModeKeys<TerminalKey, Action<I>, VimState<I>> for VimMode
source§impl<I: ApplicationInfo> ModeSequence<RepeatType, Action<I>, EmacsState<I>> for EmacsMode
impl<I: ApplicationInfo> ModeSequence<RepeatType, Action<I>, EmacsState<I>> for EmacsMode
source§fn sequences(
&self,
action: &Action<I>,
ctx: &EditContext
) -> Vec<(RepeatType, SequenceStatus)>
fn sequences( &self, action: &Action<I>, ctx: &EditContext ) -> Vec<(RepeatType, SequenceStatus)>
source§impl<I: ApplicationInfo> ModeSequence<RepeatType, Action<I>, VimState<I>> for VimMode
impl<I: ApplicationInfo> ModeSequence<RepeatType, Action<I>, VimState<I>> for VimMode
source§fn sequences(
&self,
action: &Action<I>,
ctx: &EditContext
) -> Vec<(RepeatType, SequenceStatus)>
fn sequences( &self, action: &Action<I>, ctx: &EditContext ) -> Vec<(RepeatType, SequenceStatus)>
source§impl<I: PartialEq + ApplicationInfo> PartialEq for Action<I>
impl<I: PartialEq + ApplicationInfo> PartialEq for Action<I>
impl<I: Eq + ApplicationInfo> Eq for Action<I>
impl<I: ApplicationInfo> StructuralPartialEq for Action<I>
Auto Trait Implementations§
impl<I> Freeze for Action<I>
impl<I> RefUnwindSafe for Action<I>where
<I as ApplicationInfo>::Action: RefUnwindSafe,
<I as ApplicationInfo>::WindowId: RefUnwindSafe,
impl<I> Send for Action<I>
impl<I> Sync for Action<I>
impl<I> Unpin for Action<I>
impl<I> UnwindSafe for Action<I>
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
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>
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>
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)
&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)
&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§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
key
and return true
if they are equal.