pub struct MemoryStoreConfig {
pub max_entries: usize,
pub track_stats: bool,
}Expand description
Configuration for a memory store.
Fields§
§max_entries: usizeMaximum number of entries to store (0 = unlimited).
track_stats: boolWhether to track access statistics.
Implementations§
Source§impl MemoryStoreConfig
impl MemoryStoreConfig
Sourcepub fn with_max_entries(max_entries: usize) -> Self
pub fn with_max_entries(max_entries: usize) -> Self
Create a config with a maximum entry limit.
Sourcepub fn with_stats(self) -> Self
pub fn with_stats(self) -> Self
Enable statistics tracking.
Trait Implementations§
Source§impl Clone for MemoryStoreConfig
impl Clone for MemoryStoreConfig
Source§fn clone(&self) -> MemoryStoreConfig
fn clone(&self) -> MemoryStoreConfig
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 MemoryStoreConfig
impl Debug for MemoryStoreConfig
Source§impl Default for MemoryStoreConfig
impl Default for MemoryStoreConfig
Source§fn default() -> MemoryStoreConfig
fn default() -> MemoryStoreConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemoryStoreConfig
impl RefUnwindSafe for MemoryStoreConfig
impl Send for MemoryStoreConfig
impl Sync for MemoryStoreConfig
impl Unpin for MemoryStoreConfig
impl UnsafeUnpin for MemoryStoreConfig
impl UnwindSafe for MemoryStoreConfig
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