Enum redo::Signal
[−]
[src]
pub enum Signal { Undo(bool), Redo(bool), Saved(bool), Active { old: usize, new: usize, }, }
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.
Active
Says if the active command has changed.
This signal will be emitted when the records active command has changed. This includes
when two commands have been merged, in which case old == new
.
The old
and new
fields are always index + 1
.
Fields of Active
old: usize | |
new: usize |
Trait Implementations
impl Copy for Signal
[src]
impl Clone for Signal
[src]
fn clone(&self) -> Signal
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Signal
[src]
impl Hash for Signal
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
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]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Ord for Signal
[src]
fn cmp(&self, __arg_0: &Signal) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl PartialOrd for Signal
[src]
fn partial_cmp(&self, __arg_0: &Signal) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Signal) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Signal) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Signal) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Signal) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more