pub struct DecodedCache { /* private fields */ }Expand description
Parsed index heads, partitions, segment directories, blocks and decoded
segments, shared by every handle given it with
Namespace::with_decoded_cache.
A hit costs no store call and is not charged to the read budget; a miss is
read and charged as it would be without the cache. Only the query path uses
it: index, compact, gc, inspect and recover never do. Entries are
keyed by store as well as path, so one cache can serve handles over several
stores.
Implementations§
Source§impl DecodedCache
impl DecodedCache
Sourcepub fn new(options: DecodedCacheOptions) -> Arc<Self> ⓘ
pub fn new(options: DecodedCacheOptions) -> Arc<Self> ⓘ
An empty cache.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DecodedCache
impl Forget for DecodedCache
impl Move for DecodedCache
impl RefUnwindSafe for DecodedCachewhere
Mutex<Inner>: RefUnwindSafe,
impl Send for DecodedCache
impl Sync for DecodedCache
impl Unpin for DecodedCachewhere
Align4<u32>: Unpin,
Align1<u8>: Unpin,
*const u8 is !null: Unpin,
*const Key: Unpin,
*const LruEntry<Key, (Arc<dyn Any + Sync + Send>, u64)> is !null: Unpin,
NonZero<usize>: Unpin,
*mut LruEntry<Key, (Arc<dyn Any + Sync + Send>, u64)>: Unpin,
Arc<Inner<Receiver<()>>>: Unpin,
*const ArcInner<dyn ObjectStore> is !null: Unpin,
impl UnsafeUnpin for DecodedCachewhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(KeyRef<Key>, NonNull<LruEntry<Key, (Arc<dyn Any + Sync + Send>, u64)>>)>: UnsafeUnpin,
NonZeroUsizeInner: UnsafeUnpin,
*mut LruEntry<Key, (Arc<dyn Any + Sync + Send>, u64)>: UnsafeUnpin,
PhantomData<(Key, Shared<Receiver<()>>)>: UnsafeUnpin,
PhantomData<(usize, Weak<dyn ObjectStore>)>: UnsafeUnpin,
impl UnwindSafe for DecodedCachewhere
Mutex<Inner>: UnwindSafe,
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> 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