[][src]Enum undo::Signal

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

The signal sent when the record, the history, or the target 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 target is in a saved state.

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

Current

Says if the current command has changed.

This signal will be emitted when the current command has changed. This includes when two commands have been merged, in which case old == new.

Fields of Current

old: usize

The old current command.

new: usize

The new current command.

Branch

Says if the current branch has changed.

This is currently only emitted from History.

Fields of Branch

old: usize

The old branch.

new: usize

The new branch.

Trait Implementations

impl Clone for Signal[src]

impl Copy for Signal[src]

impl Eq for Signal[src]

impl Ord for Signal[src]

impl PartialEq<Signal> for Signal[src]

impl PartialOrd<Signal> for Signal[src]

impl Debug for Signal[src]

impl Hash for Signal[src]

impl StructuralPartialEq for Signal[src]

impl StructuralEq for Signal[src]

Auto Trait Implementations

impl Send for Signal

impl Sync for Signal

impl Unpin for Signal

impl UnwindSafe for Signal

impl RefUnwindSafe for Signal

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]