pub struct Config<Key, Value>where
Key: Hash + 'static,
Value: 'static,{
pub key_hash_fn: Box<HashFn<Key>>,
pub weight_calculation_fn: Box<WeightCalculationFn<Key, Value>>,
pub clock: ClockType,
pub counters: TotalCounters,
pub command_buffer_size: usize,
pub total_cache_weight: Weight,
/* private fields */
}Expand description
Defines the config parameters for Cached.
Fields§
§key_hash_fn: Box<HashFn<Key>>§weight_calculation_fn: Box<WeightCalculationFn<Key, Value>>§clock: ClockType§counters: TotalCounters§command_buffer_size: usize§total_cache_weight: WeightAuto Trait Implementations§
impl<Key, Value> Freeze for Config<Key, Value>
impl<Key, Value> !RefUnwindSafe for Config<Key, Value>
impl<Key, Value> Send for Config<Key, Value>
impl<Key, Value> Sync for Config<Key, Value>
impl<Key, Value> Unpin for Config<Key, Value>
impl<Key, Value> !UnwindSafe for Config<Key, Value>
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