Enum ultron_core::editor::Command
source · pub enum Command {
Show 24 variants
IndentForward,
IndentBackward,
BreakLine,
DeleteBack,
DeleteForward,
MoveUp,
MoveDown,
MoveLeft,
MoveLeftStart,
MoveRight,
MoveRightEnd,
InsertChar(char),
ReplaceChar(char),
InsertText(String),
PasteTextBlock(String),
MergeText(String),
SetContent(String),
Undo,
Redo,
BumpHistory,
SetSelection(Point2<i32>, Point2<i32>),
SelectAll,
ClearSelection,
SetPosition(Point2<i32>),
}
Variants§
IndentForward
IndentBackward
BreakLine
DeleteBack
DeleteForward
MoveUp
MoveDown
MoveLeft
MoveLeftStart
MoveRight
MoveRightEnd
InsertChar(char)
ReplaceChar(char)
InsertText(String)
PasteTextBlock(String)
MergeText(String)
SetContent(String)
set a new content to the editor, resetting to a new history for undo/redo
Undo
Redo
BumpHistory
SetSelection(Point2<i32>, Point2<i32>)
SelectAll
ClearSelection
SetPosition(Point2<i32>)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.