pub struct ShardConfig {
pub max_memory: Option<usize>,
pub eviction_policy: EvictionPolicy,
pub shard_id: u16,
}Expand description
Configuration for a single keyspace / shard.
Fields§
§max_memory: Option<usize>Maximum memory in bytes. None means unlimited.
eviction_policy: EvictionPolicyWhat to do when memory is full.
shard_id: u16Numeric identifier for this shard (used for persistence file naming).
Trait Implementations§
Source§impl Clone for ShardConfig
impl Clone for ShardConfig
Source§fn clone(&self) -> ShardConfig
fn clone(&self) -> ShardConfig
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 ShardConfig
impl Debug for ShardConfig
Auto Trait Implementations§
impl Freeze for ShardConfig
impl RefUnwindSafe for ShardConfig
impl Send for ShardConfig
impl Sync for ShardConfig
impl Unpin for ShardConfig
impl UnsafeUnpin for ShardConfig
impl UnwindSafe for ShardConfig
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