Skuld.Data.Change (skuld v0.1.13)

View Source

Represents a state change with old and new values.

Used by State.put and TaggedState.put to return both the previous and updated state values. JSON-serializable for EffectLogger compatibility.

Example

%Change{old: 0, new: 42}

Summary

Functions

Reconstruct a Change from decoded JSON map.

Create a new Change struct.

Types

t()

@type t() :: %Skuld.Data.Change{new: any(), old: any()}

Functions

from_json(map)

@spec from_json(map()) :: t()

Reconstruct a Change from decoded JSON map.

new(old, new)

@spec new(any(), any()) :: t()

Create a new Change struct.