Enum modalkit::actions::EditorAction
source · #[non_exhaustive]pub enum EditorAction {
Complete(CompletionType, CompletionSelection, CompletionDisplay),
Cursor(CursorAction),
Edit(Specifier<EditAction>, EditTarget),
History(HistoryAction),
InsertText(InsertTextAction),
Mark(Specifier<Mark>),
Selection(SelectionAction),
}
Expand description
Editor manipulation
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Complete(CompletionType, CompletionSelection, CompletionDisplay)
Complete the text before the cursor group leader.
Cursor(CursorAction)
Modify the current cursor group.
Edit(Specifier<EditAction>, EditTarget)
History(HistoryAction)
Perform a history operation.
InsertText(InsertTextAction)
Insert text.
Mark(Specifier<Mark>)
Create a new Mark at the current leader position.
Selection(SelectionAction)
Modify the current selection.
Implementations§
source§impl EditorAction
impl EditorAction
sourcepub fn is_readonly(&self, ctx: &EditContext) -> bool
pub fn is_readonly(&self, ctx: &EditContext) -> bool
Indicates if this is a read-only action.
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, _: &EditContext) -> SequenceStatus
pub fn is_last_action(&self, _: &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 Clone for EditorAction
impl Clone for EditorAction
source§fn clone(&self) -> EditorAction
fn clone(&self) -> EditorAction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EditorAction
impl Debug for EditorAction
source§impl From<CursorAction> for EditorAction
impl From<CursorAction> for EditorAction
source§fn from(act: CursorAction) -> Self
fn from(act: CursorAction) -> Self
Converts to this type from the input type.
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
Converts to this type from the input type.
source§impl From<HistoryAction> for EditorAction
impl From<HistoryAction> for EditorAction
source§fn from(act: HistoryAction) -> Self
fn from(act: HistoryAction) -> Self
Converts to this type from the input type.
source§impl From<InsertTextAction> for EditorAction
impl From<InsertTextAction> for EditorAction
source§fn from(act: InsertTextAction) -> Self
fn from(act: InsertTextAction) -> Self
Converts to this type from the input type.
source§impl From<SelectionAction> for EditorAction
impl From<SelectionAction> for EditorAction
source§fn from(act: SelectionAction) -> Self
fn from(act: SelectionAction) -> Self
Converts to this type from the input type.
source§impl PartialEq for EditorAction
impl PartialEq for EditorAction
impl Eq for EditorAction
impl StructuralPartialEq for EditorAction
Auto Trait Implementations§
impl Freeze for EditorAction
impl RefUnwindSafe for EditorAction
impl Send for EditorAction
impl Sync for EditorAction
impl Unpin for EditorAction
impl UnwindSafe for EditorAction
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)