pub(crate) struct InferCtxtUndoLogs<'tcx> {
    logs: Vec<UndoLog<'tcx>>,
    num_open_snapshots: usize,
}
Expand description

The combined undo log for all the various unification tables. For each change to the storage for any kind of inference variable, we record an UndoLog entry in the vector here.

Fields§

§logs: Vec<UndoLog<'tcx>>§num_open_snapshots: usize

Implementations§

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
Performs the mutable indexing (container[index]) operation. Read more

The UndoLogs trait defines how we undo a particular kind of action (of type T). We can undo any action that is convertible into an UndoLog (per the From impls above).

How many open snapshots this undo log currently has
Pushes a new “undo item” onto the undo log. This method is invoked when some action is taken (e.g., a variable is unified). It records the info needed to reverse that action should an enclosing snapshot be rolleod back. Read more
Removes all items from the undo log.
Extends the undo log with many undos.
True if a snapshot has started, false otherwise

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes