pub struct FsKvStore { /* private fields */ }Implementations§
Source§impl FsKvStore
impl FsKvStore
pub fn open(path: &Path) -> Result<Self, FileStoreError>
pub fn init(path: &Path) -> Result<Self, FileStoreError>
pub fn from_memory() -> Result<Self, FileStoreError>
pub fn get_root(self) -> VfsPath
Trait Implementations§
Source§impl KVStore<FileStoreError> for FsKvStore
impl KVStore<FileStoreError> for FsKvStore
Source§fn create_bucket(&mut self, key: &[u8]) -> Result<(), FileStoreError>
fn create_bucket(&mut self, key: &[u8]) -> Result<(), FileStoreError>
creates a new bucket
Source§fn delete_record(&mut self, key: &[u8]) -> Result<(), FileStoreError>
fn delete_record(&mut self, key: &[u8]) -> Result<(), FileStoreError>
delete a data record (could also be a bucket)
Source§fn store_record(
&mut self,
key: &[u8],
value: &[u8],
) -> Result<(), FileStoreError>
fn store_record( &mut self, key: &[u8], value: &[u8], ) -> Result<(), FileStoreError>
store a data record
Source§fn fetch_record(&self, key: &[u8]) -> Result<Vec<u8>, FileStoreError>
fn fetch_record(&self, key: &[u8]) -> Result<Vec<u8>, FileStoreError>
fetch a data record
Source§fn list_records(
&self,
from: &[u8],
to: &[u8],
) -> Result<Vec<Vec<u8>>, FileStoreError>
fn list_records( &self, from: &[u8], to: &[u8], ) -> Result<Vec<Vec<u8>>, FileStoreError>
Auto Trait Implementations§
impl !RefUnwindSafe for FsKvStore
impl !UnwindSafe for FsKvStore
impl Freeze for FsKvStore
impl Send for FsKvStore
impl Sync for FsKvStore
impl Unpin for FsKvStore
impl UnsafeUnpin for FsKvStore
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more