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(OPoint<i32, Const<2>>, OPoint<i32, Const<2>>),
SelectAll,
ClearSelection,
SetPosition(OPoint<i32, Const<2>>),
}
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(OPoint<i32, Const<2>>, OPoint<i32, Const<2>>)
SelectAll
ClearSelection
SetPosition(OPoint<i32, Const<2>>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.