Skip to main content

register_preference_save

Function register_preference_save 

Source
pub fn register_preference_save(
    store: PreferencesRef,
    key: String,
    read: impl Fn() -> String + Send + Sync + 'static,
) -> DurableSaveRegistration
Expand description

Registers a value to be sampled when saving starts and batched with other keys using the same store. The callback must not perform storage I/O.