Skip to main content

Module store

Module store 

Source
Expand description

The settings store: typed settings models stored as one JSON blob per code.

A settings model is a plain serde struct, stored as one JSON value keyed by a stable code, with compile-time-typed access. A generic, untyped get/set is also provided for the settings controller, which renders and saves any registered settings item without knowing its concrete type. The JSON is stored as text, so the store is portable across backends.

Enums§

SettingsError

Traits§

SettingsModel
A settings model: a serde struct with a stable storage code and a default.

Functions§

get
Reads the raw JSON value for a code, for the generic settings controller.
load
Loads a typed settings model, returning its Default when unset.
save
Upserts a typed settings model.
set
Upserts the raw JSON value for a code.