pub struct FileStore<V> { /* private fields */ }
Expand description
A simple file system based key:value data store
Implementations§
Source§impl<V, E> FileStore<V>
impl<V, E> FileStore<V>
Sourcepub fn store<P: AsRef<Path>>(&mut self, name: P, v: &V) -> Result<(), Error<E>>
pub fn store<P: AsRef<Path>>(&mut self, name: P, v: &V) -> Result<(), Error<E>>
Store a file by name
Sourcepub fn load_all(&mut self) -> Result<Vec<(String, V)>, Error<E>>
pub fn load_all(&mut self) -> Result<Vec<(String, V)>, Error<E>>
Load all files from the database
Auto Trait Implementations§
impl<V> Freeze for FileStore<V>
impl<V> RefUnwindSafe for FileStore<V>where
V: RefUnwindSafe,
impl<V> Send for FileStore<V>where
V: Send,
impl<V> Sync for FileStore<V>where
V: Sync,
impl<V> Unpin for FileStore<V>where
V: Unpin,
impl<V> UnwindSafe for FileStore<V>where
V: UnwindSafe,
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