Expand description
Application settings: typed store with all v1 defaults.
§Layout
mod.rs—Settingsstruct, sub-structs, load/save, andSettingsHandle.defaults.rs—Default for Settingswith every v1 default from the proposal.
§Persistence
${app_config_dir}/settings.json is the canonical backing file. On save the
file is written atomically (temp file + rename) so a crash during write cannot
corrupt the stored settings.
§Forward-compatibility
The unknown field uses #[serde(flatten)] over a BTreeMap<String, Value>.
Any JSON key that does not map to a known field is round-tripped verbatim, so
settings written by a future app version are preserved when the user downgrades.
§OCP
Typed sub-structs (NotificationSettings, TransferConfirmations, …) make
adding a new sub-field a non-breaking change — serde simply deserialises new
keys into unknown on older builds and propagates them back on save.
Modules§
- defaults 🔒
Defaultimplementation forSettings.
Structs§
- Auto
Update Settings - Auto-update channel and behaviour.
- Notification
Settings - Controls in-app and OS-level notification behaviour.
- S3Compatible
Endpoint - A single S3-compatible endpoint entry in the endpoint registry.
- Settings
- All application settings, versioned and forward-compatible.
- Settings
Handle - Newtype around
Arc<Mutex<Settings>>used as Tauri managed state. - Startup
Behavior - What the app does on startup.
- Transfer
Confirmations - Confirmation thresholds for potentially destructive or billable operations.
Enums§
- Proxy
Mode - HTTP proxy mode.
Functions§
- validate_
patch - Validate a JSON patch object before applying it to
Settings.