pub struct SetValueCommand<T: Clone + Send + Sync + 'static> { /* private fields */ }Expand description
Simple value change command
Implementations§
Trait Implementations§
Source§impl<T: Clone + Send + Sync + 'static> Command for SetValueCommand<T>
impl<T: Clone + Send + Sync + 'static> Command for SetValueCommand<T>
Source§fn execute(&mut self) -> CommandResult
fn execute(&mut self) -> CommandResult
Execute the command
Source§fn undo(&mut self) -> CommandResult
fn undo(&mut self) -> CommandResult
Undo the command
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get command description
Source§fn redo(&mut self) -> CommandResult
fn redo(&mut self) -> CommandResult
Redo the command (default: re-execute)
Source§fn merge(&mut self, _other: Box<dyn Command>) -> Option<Box<dyn Command>>
fn merge(&mut self, _other: Box<dyn Command>) -> Option<Box<dyn Command>>
Merge with another command (returns merged command)
Source§fn memory_size(&self) -> usize
fn memory_size(&self) -> usize
Estimate memory usage of this command
Auto Trait Implementations§
impl<T> Freeze for SetValueCommand<T>where
T: Freeze,
impl<T> RefUnwindSafe for SetValueCommand<T>where
T: RefUnwindSafe,
impl<T> Send for SetValueCommand<T>
impl<T> Sync for SetValueCommand<T>
impl<T> Unpin for SetValueCommand<T>where
T: Unpin,
impl<T> UnwindSafe for SetValueCommand<T>where
T: UnwindSafe,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more