Expand description
The settings registry: which settings exist, who owns them, and what they resolve to.
Each process that has settings (the bridge, an app server) is a SettingsOwner. A
Registry merges the owners’ definitions into one namespace keyed by TOML path;
list and get read the scope files and resolve each key’s effective value;
apply writes a batch of changes, validated as a whole, keeping comments.
Modules§
- gui
- The keys of the GUI’s settings: stored by the bridge, read by the apps’ windows.
Structs§
- Applied
- What a batch changed.
- Entry
- One setting as reported to a client.
- Field
Error - One problem an owner found while validating.
- Registry
- Every owner’s definitions in one namespace, checked for clashes.
- Setting
Def - The registry’s description of one setting.
- Staged
- The edited text of the files a batch touches, before it is written.
- Start
State - The effective values of the restart-only keys when the process started, to tell which changes are written but not yet in effect.
Enums§
- Apply
- When a changed setting takes effect.
- Entry
Value - What
get/listreport for a key. - Error
- Why a settings operation failed.
- Kind
- The type of a setting’s value, and so what it accepts.
- Op
- One change in a batch.
- Origin
- Where the effective value came from.
- Process
- Which process owns a setting: the one that stores, validates and applies it.
- Scope
- Where a setting is stored. Ordered as declared: device, workgroup, workspace.
- Secret
State - Whether a secret has a value; the value itself is never exposed.
- Value
- A typed setting value.
Constants§
- SERVER_
NAMES - The top-level names the app server’s framework keeps for itself, whether or not it defines keys there: an application declares its own top-level names beside these, never one of them. Adding a name here is a breaking change.
Traits§
- Settings
Owner - A process that has settings: it defines them and says where its scope files live.
Functions§
- apply
- Apply
opsto the scope files, all or nothing. - check
- Everything
applydoes up to and including the owners’validate, writing nothing: the sameApplied, or the same error, thatapplywould produce. - describe_
toml_ error - A TOML parse error of
textas the line and column it is at and what is wrong, never the text itself: a settings file may hold an application’s tokens beside the settings.spanandmessageare the error’s own (toml::de::Error,toml_edit::TomlError). - get
- The effective value of one key.
- list
- List settings: every key’s effective value, or with a scope only what that scope’s
file holds (shown with the value it holds).
startmarks pending restarts. - write_
atomic - Write
texttopaththrough a temp file and a rename, creating the directory. - write_
private - Like
write_atomic, but the file is readable by its owner only (0600 on unix).
Type Aliases§
- Result
- Result alias for this crate.