pub struct KvStore {}
Expand description
A simple-to-use log structured key-value store.
Key-value pairs are stored in a HashMap
in memory and not persisted to disk.
§Example:
let mut store = KvStore::new();
store.set("key".to_owned(), "value".to_owned());
let val = store.get("key".to_owned());
assert_eq!(val, Some("value".to_owned()));
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KvStore
impl RefUnwindSafe for KvStore
impl Send for KvStore
impl Sync for KvStore
impl Unpin for KvStore
impl UnwindSafe for KvStore
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