pub struct Bitcask { /* private fields */ }Implementations§
Source§impl Bitcask
impl Bitcask
pub fn new(config: Config) -> Self
pub fn open(config: Config) -> Self
pub fn get<Q>(&self, key: &Q) -> Result<Option<Vec<u8>>, Error>
pub fn set(&mut self, key: Vec<u8>, value: Vec<u8>) -> Result<(), Error>
pub fn delete(&mut self, key: Vec<u8>) -> Result<(), Error>
pub fn exists(&self, key: &Vec<u8>) -> Result<bool, Error>
pub fn merge(&mut self, since: Option<u64>) -> Result<(), Error>
pub fn keys(&self) -> StoreKeys<'_>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bitcask
impl RefUnwindSafe for Bitcask
impl Send for Bitcask
impl Sync for Bitcask
impl Unpin for Bitcask
impl UnwindSafe for Bitcask
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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