Snapshot

Wrapper for a snapshot type, which is a type that keeps track of a type's value history.

Constructors

this
this()

Creates a new snapshot of a type.

this
this(T initValue)

Creates a new snapshot of a type.

Alias This

value

Alias this to set the value directly for the snapshot.

Members

Functions

opCmp
int opCmp(T comparison)

Operator overload for comparing scalar types.

opEquals
bool opEquals(T comparison)

Operator overload for equality comparison between scalar types.

opIndex
T opIndex(size_t index)

Operator overload for indexing to retrieve a specific historical snapshot of the type.

prev
void prev()

Rolls back to the previous value.

prev
void prev(size_t states)

Rolls back a specific amount of states.

reset
void reset()

Resets the value to its first known value.

Properties

value
T value [@property setter]

Sets the value.

value
T value [@property getter]

Gets the value.

Meta