pub struct ValuesStore { /* private fields */ }Implementations§
Source§impl ValuesStore
impl ValuesStore
Sourcepub fn new(
registry: Arc<SchemaRegistry>,
values_dir: &Path,
) -> ValidationResult<Self>
pub fn new( registry: Arc<SchemaRegistry>, values_dir: &Path, ) -> ValidationResult<Self>
Build a store and perform the initial values load synchronously.
Sourcepub fn with_propagation_callback(
registry: Arc<SchemaRegistry>,
values_dir: &Path,
callback: PropagationCallback,
) -> ValidationResult<Self>
pub fn with_propagation_callback( registry: Arc<SchemaRegistry>, values_dir: &Path, callback: PropagationCallback, ) -> ValidationResult<Self>
Build a store with a callback that fires whenever new values are detected.
The callback receives (namespace, delay_secs) on each value change.
Sourcepub fn registry(&self) -> &Arc<SchemaRegistry>
pub fn registry(&self) -> &Arc<SchemaRegistry>
The registry the store was constructed with.
Sourcepub fn load(&self) -> Guard<Arc<ValuesByNamespace>>
pub fn load(&self) -> Guard<Arc<ValuesByNamespace>>
Returns a guard onto the current values snapshot, refreshing first if
the cached snapshot is older than refresh_threshold + jitter.
Auto Trait Implementations§
impl !Freeze for ValuesStore
impl !RefUnwindSafe for ValuesStore
impl !UnwindSafe for ValuesStore
impl Send for ValuesStore
impl Sync for ValuesStore
impl Unpin for ValuesStore
impl UnsafeUnpin for ValuesStore
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