pub struct CounterConfig {
pub counter_bits: BitCount,
pub change_on_insert: i32,
pub change_on_lookup: i32,
}Expand description
Configuration for the generic counter field.
Used to define memory used by the generic counter field, also affecting its maximum value.
§Examples
use cuckoo_clock::config::CounterConfig;
let ttl_config = CounterConfig {
counter_bits: 5.try_into()?,
..Default::default()
};Fields§
§counter_bits: BitCountHow many bits are used to represent the generic counter. Larget bit counts allow higher counter values to be represented.
change_on_insert: i32Diff to apply to counter on each insert.
change_on_lookup: i32Diff to apply to counter on each lookup.
Trait Implementations§
Source§impl Clone for CounterConfig
impl Clone for CounterConfig
Source§fn clone(&self) -> CounterConfig
fn clone(&self) -> CounterConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CounterConfig
impl Debug for CounterConfig
Source§impl Default for CounterConfig
impl Default for CounterConfig
impl Eq for CounterConfig
Source§impl PartialEq for CounterConfig
impl PartialEq for CounterConfig
Source§fn eq(&self, other: &CounterConfig) -> bool
fn eq(&self, other: &CounterConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CounterConfig
Auto Trait Implementations§
impl Freeze for CounterConfig
impl RefUnwindSafe for CounterConfig
impl Send for CounterConfig
impl Sync for CounterConfig
impl Unpin for CounterConfig
impl UnsafeUnpin for CounterConfig
impl UnwindSafe for CounterConfig
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