pub struct MemoryStore { /* private fields */ }Expand description
In-process KvStore (sharded Mutex maps + TTL).
Implementations§
Source§impl MemoryStore
impl MemoryStore
Sourcepub fn with_shards(n: usize) -> Self
pub fn with_shards(n: usize) -> Self
Explicit shard count (minimum 1).
Trait Implementations§
Source§impl Clone for MemoryStore
impl Clone for MemoryStore
Source§fn clone(&self) -> MemoryStore
fn clone(&self) -> MemoryStore
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 Default for MemoryStore
impl Default for MemoryStore
Source§impl KvStore for MemoryStore
impl KvStore for MemoryStore
fn get<'a>(&'a self, key: &'a str) -> BoxFuture<'a, Option<Bytes>>
fn set<'a>( &'a self, key: &'a str, val: Bytes, ttl: Option<Duration>, ) -> BoxFuture<'a, ()>
fn remove<'a>(&'a self, key: &'a str) -> BoxFuture<'a, ()>
Auto Trait Implementations§
impl Freeze for MemoryStore
impl RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl UnsafeUnpin for MemoryStore
impl UnwindSafe for MemoryStore
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