Skip to main content

save_config_store

Function save_config_store 

Source
pub fn save_config_store(
    state: &LoadedConfigStore,
    expected_revision: &str,
    update: &ConfigPolicyUpdate,
) -> Result<ConfigSaveResult, ConfigStoreError>
Expand description

Safely save the two config-page-managed settings with optimistic-concurrency checks.

The caller must provide the revision token it last loaded. The save is rejected when that token is stale or the on-disk bytes no longer match the bytes this store last loaded or wrote, preventing blind overwrites of external edits.