Expand description
Tauri commands for reading and updating application settings.
§Commands
settings_get— return the currentSettingssnapshot.settings_update— apply a JSON patch, validate, persist atomically.
Both commands take tauri::State<SettingsHandle> so they share the same
Arc<Mutex<Settings>> that was seeded at app start.
§Hot-reload
settings_update also pushes runtime-affecting changes into the live
services:
proxy→ClientPool::set_proxy(rebuilds connectors).transfer_concurrency→TransferQueue::rebuild_semaphore.
Cache TTL changes still require an app restart — the cache stores them as immutable config at open time.
Functions§
- json_
merge 🔒 - Recursive JSON merge (RFC 7396 spirit).
- settings_
get - Return the current settings as a serialised
Settingsvalue. - settings_
update - Apply a JSON patch to the current settings, validate, and persist.