#[non_exhaustive]pub enum CacheReadStrategy {
WritesOnly,
BranchReads,
All,
}Expand description
The strategy for caching nodes that are read from the storage layer. Generally, we only want to cache write operations, but for some read-heavy workloads you can enable caching of branch reads or all reads.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WritesOnly
Only cache writes (no reads will be cached)
BranchReads
Cache branch reads (reads that are not leaf nodes)
All
Cache all reads (leaves and branches)
Trait Implementations§
Source§impl Clone for CacheReadStrategy
impl Clone for CacheReadStrategy
Source§fn clone(&self) -> CacheReadStrategy
fn clone(&self) -> CacheReadStrategy
Returns a duplicate of the value. Read more
1.0.0 · 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 CacheReadStrategy
impl Debug for CacheReadStrategy
Source§impl Display for CacheReadStrategy
impl Display for CacheReadStrategy
Source§impl Hash for CacheReadStrategy
impl Hash for CacheReadStrategy
Source§impl Ord for CacheReadStrategy
impl Ord for CacheReadStrategy
Source§fn cmp(&self, other: &CacheReadStrategy) -> Ordering
fn cmp(&self, other: &CacheReadStrategy) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CacheReadStrategy
impl PartialEq for CacheReadStrategy
Source§impl PartialOrd for CacheReadStrategy
impl PartialOrd for CacheReadStrategy
impl Copy for CacheReadStrategy
impl Eq for CacheReadStrategy
impl StructuralPartialEq for CacheReadStrategy
Auto Trait Implementations§
impl Freeze for CacheReadStrategy
impl RefUnwindSafe for CacheReadStrategy
impl Send for CacheReadStrategy
impl Sync for CacheReadStrategy
impl Unpin for CacheReadStrategy
impl UnsafeUnpin for CacheReadStrategy
impl UnwindSafe for CacheReadStrategy
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> Comparable<K> for Q
impl<Q, K> Comparable<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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ValueSize for T
impl<T> ValueSize for T
Source§fn value_size(&self) -> usize
fn value_size(&self) -> usize
The size of this value in bytes, excluding allocated data. Read more
Source§fn value_size_sum_iter<'item>(iterator: impl Iterator<Item = &'item T>) -> usizewhere
T: 'item,
fn value_size_sum_iter<'item>(iterator: impl Iterator<Item = &'item T>) -> usizewhere
T: 'item,
The total sum of the sizes of all values in the given iterator, in
bytes. This is default-implemented by computing ValueSize::value_size
on every element and summing them. For Sized types, a more potentially
efficient implementation using Iterator::count is provided. If you are
implementing this trait manually, it is unlikely to be more efficient to
provide a manual implementation here. Read more
Source§fn value_size_sum_exact_size_iter<'item>(
iterator: impl ExactSizeIterator<Item = &'item T>,
) -> usizewhere
T: 'item,
fn value_size_sum_exact_size_iter<'item>(
iterator: impl ExactSizeIterator<Item = &'item T>,
) -> usizewhere
T: 'item,
The total sum of the sizes of all values in the given
exact-size-iterator, in bytes. This is default-implemented by using
ValueSize::value_size_sum_iter. For Sized types, a usually more
efficient implementation using ExactSizeIterator::len is provided. If
you are implementing this trait manually, it is unlikely to be more
efficient to provide a manual implementation here. Read more