Struct rundo_types::primitive_type::ValueType
[−]
[src]
pub struct ValueType<T> where
T: Clone + PartialEq, { /* fields omitted */ }
Value type like a memory undo/redo type. Rundo will clone its origin value as a backup, so Clone must be implemented. Be careful use it for struct or other big size type, OpType is design for this scenario, or you must implment your custrom rundo type.
Trait Implementations
impl<T> Deref for ValueType<T> where
T: Clone + PartialEq,
[src]
T: Clone + PartialEq,
impl Deref let ValueType
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &T
[src]
Dereferences the value.
impl<T> DerefMut for ValueType<T> where
T: Clone + PartialEq,
[src]
T: Clone + PartialEq,
when user try to get a mut refercence, Rundo know what changed in the later.
impl<T> From<T> for ValueType<T> where
T: Clone + PartialEq,
[src]
T: Clone + PartialEq,
impl<T> AsMut<T> for ValueType<T> where
T: 'static + Clone + PartialEq,
[src]
T: 'static + Clone + PartialEq,
impl<T> AsRef<T> for ValueType<T> where
T: 'static + Clone + PartialEq,
[src]
T: 'static + Clone + PartialEq,
impl<T> Rundo for ValueType<T> where
T: Clone + PartialEq + Debug + Primitive,
[src]
T: Clone + PartialEq + Debug + Primitive,
type Op = VtOp<T>
fn dirty(&self) -> bool
[src]
if this node has been changed between from the last step to current.
fn reset(&mut self)
[src]
Reset the node change state which mean changes has been record by workspace, or changes will be ignore. Read more
fn change_op(&mut self) -> Option<Self::Op>
[src]
Use Op to describe the change infos.
fn back(&mut self, op: &Self::Op)
[src]
Use an Op and back to the previous data status
fn forward(&mut self, op: &Self::Op)
[src]
Go to the next version of the data should be with a Op.
impl Rundo for ValueType<String>
[src]
type Op = Vec<StrOP>
fn dirty(&self) -> bool
[src]
if this node has been changed between from the last step to current.
fn reset(&mut self)
[src]
Reset the node change state which mean changes has been record by workspace, or changes will be ignore. Read more
fn change_op(&mut self) -> Option<Self::Op>
[src]
Use Op to describe the change infos.
fn back(&mut self, op: &Self::Op)
[src]
Use an Op and back to the previous data status
fn forward(&mut self, op: &Self::Op)
[src]
Go to the next version of the data should be with a Op.