Skip to main content

Crate attune

Crate attune 

Source
Expand description

Runtime-mutable, persisted, observable configuration for Rust.

attune is the user-facing crate. It re-exports the core types and the Settings derive macro, and (with the default sqlite feature) the SQLite backend.

Structs§

ConfigPathOptions
FieldResolveOptions
Inputs used to resolve a single read-only config field.
NoopBackend
PersistResolveOptions
Inputs used to resolve a single persisted config field.
PersistedField
Read, write, and subscribe access to a generated persisted settings field.
ReadOnlyField
Read-only access to a generated settings field.
SettingsHandle
SqliteBackend
SqliteOptions
StoredValue

Enums§

ApplyResult
BackendError
Errors returned by storage backends.
ChangeEvent
ChangeSource
SettingsError
Errors returned by generated settings loaders, field setters, and config helpers.
SqliteJournalMode
SqliteSynchronous

Traits§

StorageBackend

Functions§

decode_persist_value
Decodes a persisted value, with an optional legacy fallback parser.
load_toml_file
Loads an optional TOML config file into a table.
resolve_config_file
Resolves the path to an optional config file.
resolve_persist_field
Resolves a persisted config field from stored values or read-only fallback sources.
resolve_readonly_field
Resolves a read-only config field from environment, TOML, or a default.

Type Aliases§

DeserializeFallback
Function pointer used to parse legacy persisted values.
ExternalApplier

Derive Macros§

Settings
Expands #[derive(Settings)].