pub struct FileKv { /* private fields */ }Available on crate feature
std only.Expand description
A key-value store as one file per key in a directory.
Writes go to a temporary file and are renamed into place, so a power cut leaves either the old value or the new one and never half of either — which is the property the fail-safe of Core §11.10 is built on.
Implementations§
Trait Implementations§
Source§impl KvStore for FileKv
impl KvStore for FileKv
Source§fn set(&self, key: &str, value: &[u8]) -> impl Future<Output = Result<()>>
fn set(&self, key: &str, value: &[u8]) -> impl Future<Output = Result<()>>
Writes
value to key, replacing what was there.Auto Trait Implementations§
impl Forget for FileKv
impl Freeze for FileKv
impl Move for FileKv
impl RefUnwindSafe for FileKv
impl Send for FileKv
impl Sync for FileKv
impl Unpin for FileKv
impl UnsafeUnpin for FileKv
impl UnwindSafe for FileKv
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