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

Says if the record can undo.

This signal will be emitted when the records ability to undo changes.

Says if the record can redo.

This signal will be emitted when the records ability to redo changes.

Says if the receiver is in a saved state.

This signal will be emitted when the record enters or leaves its receivers saved state.

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

Trait Implementations

impl Copy for Signal
[src]

impl Clone for Signal
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Signal
[src]

[src]

Formats the value using the given formatter. Read more

impl Hash for Signal
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for Signal
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd for Signal
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

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 PartialEq for Signal
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

Auto Trait Implementations

impl Send for Signal

impl Sync for Signal