pub struct InternalCacheKey { /* private fields */ }Expand description
Structured cache key passed to CacheBackend methods.
CacheBackend impls receive these ready-made from LanceCache
— you do not construct them yourself. Composed of three parts:
- prefix: scopes the key to a dataset or index (e.g.
"s3://bucket/dataset/") - key: identifies the specific entry (e.g.
"42"for a version number) - type_name: distinguishes different value types stored under the same
user key (e.g.
"Vec<IndexMetadata>")
Implementations§
Source§impl InternalCacheKey
impl InternalCacheKey
pub fn new(prefix: Arc<str>, key: Arc<str>, type_name: &'static str) -> Self
pub fn prefix(&self) -> &str
pub fn key(&self) -> &str
pub fn type_name(&self) -> &'static str
Sourcepub fn starts_with(&self, prefix: &str) -> bool
pub fn starts_with(&self, prefix: &str) -> bool
Returns true if this key’s prefix starts with the given string.
Trait Implementations§
Source§impl Clone for InternalCacheKey
impl Clone for InternalCacheKey
Source§fn clone(&self) -> InternalCacheKey
fn clone(&self) -> InternalCacheKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InternalCacheKey
impl Debug for InternalCacheKey
Source§impl Hash for InternalCacheKey
impl Hash for InternalCacheKey
Source§impl PartialEq for InternalCacheKey
impl PartialEq for InternalCacheKey
Source§fn eq(&self, other: &InternalCacheKey) -> bool
fn eq(&self, other: &InternalCacheKey) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for InternalCacheKey
impl StructuralPartialEq for InternalCacheKey
Auto Trait Implementations§
impl Freeze for InternalCacheKey
impl RefUnwindSafe for InternalCacheKey
impl Send for InternalCacheKey
impl Sync for InternalCacheKey
impl Unpin for InternalCacheKey
impl UnsafeUnpin for InternalCacheKey
impl UnwindSafe for InternalCacheKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more