1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
extern crate difference;
pub mod primitive_type;
pub mod string_type;
pub mod prelude {
pub use Rundo;
pub use primitive_type::*;
pub use string_type::*;
}
pub const IMPLED_RUNDO: [&str; 15] = [
"bool", "char", "i8", "u8", "i16", "u16", "i32", "u32", "i64", "u64", "f32", "f64", "isize",
"usize", "string",
];
pub trait Rundo {
type Op: std::fmt::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);
}