pub struct Tiered<M: Medium> {
pub front: MemoryCache,
pub back: Pack<M>,
}Expand description
The back is a pack and nothing else: store carries no cost, and a pack admits by kind alone,
so no back gated on cost can sit here and silently keep nothing.
Fields§
§front: MemoryCache§back: Pack<M>Implementations§
Trait Implementations§
Source§impl<M: Medium> Cache for Tiered<M>
impl<M: Medium> Cache for Tiered<M>
Source§fn held_bytes(&self) -> u64
fn held_bytes(&self) -> u64
Both tiers’ own bytes, summed: a value in both is held twice.
fn load(&self, key: Hash, node: &str, expected: Expected) -> Option<Entry>
fn store( &self, key: Hash, payload: &Payload, traces: &[FilterTrace], label: Option<&Label>, )
fn holds(&self, key: Hash) -> bool
fn worth_storing(&self, cost: Duration, bytes: usize, kind: PayloadKind) -> bool
fn sweep(&self)
fn evicted_bytes(&self) -> u64
fn faults(&self) -> u64
fn max_bytes(&self) -> u64
fn dir(&self) -> Option<&Path>
Auto Trait Implementations§
impl<M> !Freeze for Tiered<M>
impl<M> !RefUnwindSafe for Tiered<M>
impl<M> !Send for Tiered<M>
impl<M> !UnwindSafe for Tiered<M>
impl<M> Sync for Tiered<M>
impl<M> Unpin for Tiered<M>
impl<M> UnsafeUnpin for Tiered<M>where
Pack<M>: UnsafeUnpin,
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