pub struct MemoryStore { /* private fields */ }Implementations§
Source§impl MemoryStore
impl MemoryStore
pub fn new() -> MemoryStore
Sourcepub fn set_latency(&self, latency: Duration)
pub fn set_latency(&self, latency: Duration)
Add latency to every operation.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Default for MemoryStore
impl Default for MemoryStore
Source§impl Store for MemoryStore
impl Store for MemoryStore
Source§fn put(
&self,
key: &str,
seq: u64,
envelope: &Value,
) -> Result<PutOutcome, StoreError>
fn put( &self, key: &str, seq: u64, envelope: &Value, ) -> Result<PutOutcome, StoreError>
Compare-and-set write:
seq must exceed the stored one.Source§fn get(&self, key: &str, seq: Option<u64>) -> Result<Option<Value>, StoreError>
fn get(&self, key: &str, seq: Option<u64>) -> Result<Option<Value>, StoreError>
The latest record (or the pinned
seq if the store keeps history).Source§fn list(&self, prefix: &str) -> Result<Vec<KeySeq>, StoreError>
fn list(&self, prefix: &str) -> Result<Vec<KeySeq>, StoreError>
Keys under
prefix (optional; Unsupported is a legal answer).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