Crate redo[][src]

An undo-redo library with static dispatch and manual command merging.

It uses the command pattern where the user modifies the receiver by applying commands on it. Since each command knows how to undo and redo the changes it applies to the receiver, the state of the receiver can be rolled forwards or backwards by calling undo or redo in the correct order.

The Record and History provides functionality to store and keep track of the applied commands, and makes it easy to undo and redo changes. The Record provides a stack based undo-redo functionality, while the History provides a tree based undo-redo functionality where you can jump between different branches.

Commands can be merged using the merge! macro or the merge method. When two commands are merged, undoing and redoing them are done in a single step.

Structs

Display

Configurable display formatting of structures.

Error

An error which holds the command that caused it.

History

A history of commands.

HistoryBuilder

Builder for a History.

Record

A record of commands.

RecordBuilder

Builder for a record.

Enums

Merge

The result of merging two commands.

Signal

The signal sent when the record, the history, or the receiver changes.

Traits

Command

Base functionality for all commands.