pub struct ValuesStoreBuilder { /* private fields */ }Expand description
Builder for constructing a ValuesStore.
Created via ValuesStore::builder. Configure optional parameters with
the with_* methods, then finalize with build.
Implementations§
Source§impl ValuesStoreBuilder
impl ValuesStoreBuilder
Sourcepub fn with_refresh_threshold(
self,
threshold: impl Into<Option<Duration>>,
) -> Self
pub fn with_refresh_threshold( self, threshold: impl Into<Option<Duration>>, ) -> Self
Overrides the staleness threshold for refresh-on-read.
Defaults to DEFAULT_REFRESH_THRESHOLD. Pass None to disable
refresh-on-read entirely; values then only change via
ValuesStore::refresh. A zero threshold refreshes on every read.
Sourcepub fn with_callback(self, callback: PropagationCallback) -> Self
pub fn with_callback(self, callback: PropagationCallback) -> Self
Registers a callback that fires whenever new values are detected.
The callback receives (namespace, delay_secs) on each value change.
Sourcepub fn build(self) -> ValidationResult<ValuesStore>
pub fn build(self) -> ValidationResult<ValuesStore>
Builds the store and performs the initial values load synchronously.
Auto Trait Implementations§
impl !RefUnwindSafe for ValuesStoreBuilder
impl !UnwindSafe for ValuesStoreBuilder
impl Freeze for ValuesStoreBuilder
impl Send for ValuesStoreBuilder
impl Sync for ValuesStoreBuilder
impl Unpin for ValuesStoreBuilder
impl UnsafeUnpin for ValuesStoreBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more