pub struct MemoryConfig {
pub max_capacity: usize,
pub cleanup_interval: Duration,
pub max_ttl: Duration,
pub enable_ttl_index: bool,
}Expand description
Configuration for the memory backend
Fields§
§max_capacity: usizeMaximum number of entries (0 = unlimited)
cleanup_interval: DurationCleanup interval for expired entries
max_ttl: DurationMaximum TTL supported (for TTL index sizing)
enable_ttl_index: boolEnable TTL index for efficient expiration
Implementations§
Source§impl MemoryConfig
impl MemoryConfig
Sourcepub fn with_capacity(capacity: usize) -> MemoryConfig
pub fn with_capacity(capacity: usize) -> MemoryConfig
Create config with specific capacity
Sourcepub fn unlimited() -> MemoryConfig
pub fn unlimited() -> MemoryConfig
Create config with unlimited capacity
Trait Implementations§
Source§impl Clone for MemoryConfig
impl Clone for MemoryConfig
Source§fn clone(&self) -> MemoryConfig
fn clone(&self) -> MemoryConfig
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 MemoryConfig
impl Debug for MemoryConfig
Source§impl Default for MemoryConfig
impl Default for MemoryConfig
Source§fn default() -> MemoryConfig
fn default() -> MemoryConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemoryConfig
impl RefUnwindSafe for MemoryConfig
impl Send for MemoryConfig
impl Sync for MemoryConfig
impl Unpin for MemoryConfig
impl UnwindSafe for MemoryConfig
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