pub enum Signal {
Undo(bool),
Redo(bool),
Saved(bool),
Cursor {
old: usize,
new: usize,
},
Root {
old: usize,
new: usize,
},
}
Expand description
The signal sent when the record, the history, or the receiver changes.
When one of these states changes, they will send a corresponding signal to the user.
For example, if the record can no longer redo any commands, it sends a Redo(false)
signal to tell the user.
Variants§
Undo(bool)
Says if the record can undo.
This signal will be emitted when the records ability to undo changes.
Redo(bool)
Says if the record can redo.
This signal will be emitted when the records ability to redo changes.
Saved(bool)
Says if the receiver is in a saved state.
This signal will be emitted when the record enters or leaves its receivers saved state.
Cursor
Says if the current command has changed.
This signal will be emitted when the cursor has changed. This includes
when two commands have been merged, in which case old == new
.
Root
Says if the current branch, or root, has changed.
This is only emitted from History
.
Trait Implementations§
source§impl Ord for Signal
impl Ord for Signal
source§impl PartialOrd<Signal> for Signal
impl PartialOrd<Signal> for Signal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more