pub struct SemanticIndexCache { /* private fields */ }Expand description
Per-slice index cache keyed by (dim_range.start, dim_range.end).
Implementations§
Source§impl SemanticIndexCache
impl SemanticIndexCache
Sourcepub fn bump(&self)
pub fn bump(&self)
Record a mutation that may change semantic query results. Callers must apply the mutation before bumping.
Sourcepub fn get_or_build<F>(
&self,
dim_range: &Range<usize>,
snapshot: F,
) -> Arc<SliceIndex> ⓘ
pub fn get_or_build<F>( &self, dim_range: &Range<usize>, snapshot: F, ) -> Arc<SliceIndex> ⓘ
Get the cached tree for dim_range, or build one via snapshot
(a coherent read of all nodes’ decoded slice coordinates) and cache it.
snapshot runs without any cache lock held, so concurrent queries
on other slices are never blocked by a build.
Sourcepub fn cached_slice_count(&self) -> usize
pub fn cached_slice_count(&self) -> usize
Number of currently cached slices (test visibility).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SemanticIndexCache
impl RefUnwindSafe for SemanticIndexCache
impl Send for SemanticIndexCache
impl Sync for SemanticIndexCache
impl Unpin for SemanticIndexCache
impl UnsafeUnpin for SemanticIndexCache
impl UnwindSafe for SemanticIndexCache
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