Skip to main content

Module settings_cmd

Module settings_cmd 

Source
Expand description

Tauri commands for reading and updating application settings.

§Commands

  • settings_get — return the current Settings snapshot.
  • 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:

  • proxyClientPool::set_proxy (rebuilds connectors).
  • transfer_concurrencyTransferQueue::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 Settings value.
settings_update
Apply a JSON patch to the current settings, validate, and persist.