pub struct SchemaCacheHolder { /* private fields */ }Expand description
Schema cache holder with atomic swap capability
Wraps the schema cache in ArcSwap for lock-free reads and atomic updates.
Implementations§
Source§impl SchemaCacheHolder
impl SchemaCacheHolder
Sourcepub fn with_cache(cache: SchemaCache) -> Self
pub fn with_cache(cache: SchemaCache) -> Self
Create a holder with an initial cache
Sourcepub fn get(&self) -> Option<Guard<Arc<Option<SchemaCache>>>>
pub fn get(&self) -> Option<Guard<Arc<Option<SchemaCache>>>>
Get a reference to the current cache
Returns None if the cache hasn’t been loaded yet.
Sourcepub fn replace(&self, cache: SchemaCache)
pub fn replace(&self, cache: SchemaCache)
Replace the cache with a new one
Trait Implementations§
Source§impl Debug for SchemaCacheHolder
impl Debug for SchemaCacheHolder
Auto Trait Implementations§
impl !Freeze for SchemaCacheHolder
impl RefUnwindSafe for SchemaCacheHolder
impl Send for SchemaCacheHolder
impl Sync for SchemaCacheHolder
impl Unpin for SchemaCacheHolder
impl UnsafeUnpin for SchemaCacheHolder
impl UnwindSafe for SchemaCacheHolder
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