InMemoryBudgetStore

The supplied BudgetStore: keeps the last snapshot in memory.

Stable Core. Thread-safe; it survives nothing, so it is the default and the worked example of the seam. load returns the last saved snapshot or BudgetSnapshot.Empty; toString() is InMemoryBudgetStore.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open suspend override fun load(): Result<BudgetSnapshot>

Reads the stored snapshot.

Link copied to clipboard
open suspend override fun save(snapshot: BudgetSnapshot): Result<Unit>

Replaces the stored snapshot.

Link copied to clipboard
open override fun toString(): String

Returns the fixed text InMemoryBudgetStore, for diagnostics and logs.