pub struct SingleStore { /* private fields */ }
Expand description
A wrapper for an Rkv store. Implemented to allow any value which supports serde to be used.
Implementations§
source§impl SingleStore
impl SingleStore
pub fn new(store: SingleStore<SafeModeDatabase>) -> Self
pub fn put<T: Serialize + for<'de> Deserialize<'de>>( &self, writer: &mut Writer<'_>, key: &str, persisted_data: &T, ) -> Result<()>
pub fn delete(&self, writer: &mut Writer<'_>, key: &str) -> Result<()>
pub fn clear(&self, writer: &mut Writer<'_>) -> Result<()>
pub fn get<'r, T, R>(&self, reader: &'r R, key: &str) -> Result<Option<T>>
sourcepub fn try_collect_all<'r, T, R>(&self, reader: &'r R) -> Result<Vec<T>>
pub fn try_collect_all<'r, T, R>(&self, reader: &'r R) -> Result<Vec<T>>
Fork of collect_all that simply drops records that fail to read rather than simply returning an error up the stack. This likely wants to be just a parameter to collect_all, but for now….
pub fn collect_all<'r, T, R>(&self, reader: &'r R) -> Result<Vec<T>>
Auto Trait Implementations§
impl Freeze for SingleStore
impl RefUnwindSafe for SingleStore
impl Send for SingleStore
impl Sync for SingleStore
impl Unpin for SingleStore
impl UnwindSafe for SingleStore
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more