Enum undo::Signal [−][src]
The signals sent when the record or the receiver changes.
When one of these states changes in the record or the receiver, they will send a corresponding
signal to the user. For example, if the record can no longer redo any commands, it sends a
Signal::Redo(false)
signal to tell the user. The signals can be handled in the signals
method.
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 records cursor has changed. This includes
when two commands have been merged, in which case old == new
.
Fields of Cursor
old: usize | The position of the old command. |
new: usize | The position of the new command. |
Trait Implementations
impl Copy for Signal
[src]
impl Copy for Signal
impl Clone for Signal
[src]
impl Clone for Signal
fn clone(&self) -> Signal
[src]
fn clone(&self) -> Signal
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Signal
[src]
impl Debug for Signal
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Hash for Signal
[src]
impl Hash for Signal
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Ord for Signal
[src]
impl Ord for Signal
fn cmp(&self, other: &Signal) -> Ordering
[src]
fn cmp(&self, other: &Signal) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for Signal
[src]
impl PartialOrd for Signal
fn partial_cmp(&self, other: &Signal) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Signal) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Signal) -> bool
[src]
fn lt(&self, other: &Signal) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Signal) -> bool
[src]
fn le(&self, other: &Signal) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Signal) -> bool
[src]
fn gt(&self, other: &Signal) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Signal) -> bool
[src]
fn ge(&self, other: &Signal) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for Signal
[src]
impl Eq for Signal
impl PartialEq for Signal
[src]
impl PartialEq for Signal