INNER CODE UNIT · Rust
all
gosub-io/gosub-engine · crates/gosub_config/src/lib.rs:37
fn all(&self) -> Result<HashMap<String, Setting>>;
/// Flushes any buffered writes to the backing store. Adapters that persist eagerly on every
/// `set` (or not at all, like the in-memory adapter) treat this as a no-op.
fn flush(&self) -> Result<()> {
Ok(())
}
}
/// Identifies a registered subscription so it can later be removed via [`Config::unsubscribe`].
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct SubscriptionId(u64);
/// Callback invoked when a watched setting changes. It receives the setting key and the new value.
///
/// The callback is invoked after the store's internal lock has been released, so it MAY read or
/// write the same [`Config`] without deadlocking. Beware infinite recursion if a callback sets a
/// key it also subscribes to.