[][src]Trait sccache::lru_disk_cache::lru_cache::CountableMeterWithMeasure

pub trait CountableMeterWithMeasure<K, V, M> {
    pub fn meter_add(&self, current: M, amount: M) -> M;
pub fn meter_sub(&self, current: M, amount: M) -> M;
pub fn meter_size(&self, current: M) -> Option<u64>; }

Required methods

pub fn meter_add(&self, current: M, amount: M) -> M[src]

Add amount to current and return the sum.

pub fn meter_sub(&self, current: M, amount: M) -> M[src]

Subtract amount from current and return the difference.

pub fn meter_size(&self, current: M) -> Option<u64>[src]

Return current as a usize if possible, otherwise return None.

If this method returns None the cache will use the number of cache entries as its size.

Loading content...

Implementors

impl<K, V> CountableMeterWithMeasure<K, V, ()> for Count[src]

impl<K, V, T> CountableMeterWithMeasure<K, V, usize> for T where
    T: Meter<K, V>, 
[src]

For any other Meter with Measure=usize, just do the simple math.

Loading content...