Module rustc_ap_rustc_data_structures::undo_log[][src]

Expand description

Module which contains the snapshot/rollback functionality of the ena data structures.

For most usecases this is just an internal implementation detail. However if many ena data structures are used snapshotted simultaneously it is possible to use UnificationTableStorage/SnapshotVecStorage instead and use a custom UndoLogs<T> type capable of recording the actions of all used data structures.

Since the *Storage variants do not have an undo log with_log must be called with the unified log before any mutating actions.

Structs

NoUndo
Snapshot

Snapshots are tokens that should be created/consumed linearly.

VecLog

A basic undo log.

Traits

Rollback

A trait implemented for storage types (like SnapshotVecStorage) which can be rolled back using actions of type U.

Snapshots

A trait which extends UndoLogs to allow snapshots to be done at specific points. Each snapshot can then be used to rollback any changes to an underlying data structures if they were not desirable.

UndoLogs

A trait which allows undo actions (T) to be pushed which can be used to rollback actio at a later time if needed.