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
source§fn eq(&self, other: &EditorAction) -> bool
fn eq(&self, other: &EditorAction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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> 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§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.