Trait rundo_types::Rundo [] [src]

pub trait Rundo {
    type Op: Debug;
    fn dirty(&self) -> bool;
fn change_op(&mut self) -> Option<Self::Op>;
fn reset(&mut self);
fn back(&mut self, op: &Self::Op);
fn forward(&mut self, op: &Self::Op); }

Every rundo node must implement Rundo trait to support undo/redo. In most of case, you can derive Rundo, of course, you can implement it by yourself.

Associated Types

Required Methods

if this node has been changed between from the last step to current.

Use Op to describe the change infos.

Reset the node change state which mean changes has been record by workspace, or changes will be ignore.

Use an Op and back to the previous data status

Go to the next version of the data should be with a Op.

Implementors