pub struct SledStore { /* private fields */ }
Expand description
Usage
use std::path::Path;
use crate::kvs::KvsEngine;
use kvs::SledStore;
let mut path = Path::new("/tmp/sled");
let mut store = SledStore::open(path).unwrap();
store.set("key1".to_owned(), "value1".to_owned());
assert_eq!(store.get("key1".to_owned())?, Some("value1".to_owned()));
store.remove("key1".to_owned());
In memory key value storage String:String
Implementations
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for SledStore
impl Send for SledStore
impl Sync for SledStore
impl Unpin for SledStore
impl !UnwindSafe for SledStore
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more