Enum undo::Signal[][src]

pub enum Signal {
    Undo(bool),
    Redo(bool),
    Saved(bool),
    Cursor {
        old: usize,
        new: usize,
    },
    Branch {
        old: usize,
        new: usize,
    },
}

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

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 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.

Fields of Cursor

The old cursor.

The new cursor.

Says if the current branch has changed.

This is only emitted from History.

Fields of Branch

The old branch.

The new branch.

Trait Implementations

impl Copy for Signal
[src]

impl Clone for Signal
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Signal
[src]

Formats the value using the given formatter. Read more

impl Hash for Signal
[src]

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

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

impl Ord for Signal
[src]

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialOrd for Signal
[src]

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

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

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

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

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]

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

This method tests for !=.

Auto Trait Implementations

impl Send for Signal

impl Sync for Signal