pub struct PersistenceEngine { /* private fields */ }Implementations§
Source§impl PersistenceEngine
impl PersistenceEngine
pub async fn new(config: PersistenceConfig) -> Result<Self, Box<dyn Error>>
pub async fn set( &self, db: String, key: String, entry: Entry, ) -> Result<(), Box<dyn Error>>
pub async fn delete( &self, db: String, key: String, ) -> Result<(), Box<dyn Error>>
pub async fn expire( &self, db: String, key: String, expires_at: u64, ) -> Result<(), Box<dyn Error>>
pub async fn create_snapshot( &self, databases: &HashMap<String, HashMap<String, Entry>>, ) -> Result<u64, Box<dyn Error>>
pub async fn recover( &self, ) -> Result<HashMap<String, HashMap<String, Entry>>, Box<dyn Error>>
pub async fn shutdown(&self) -> Result<(), Box<dyn Error>>
Trait Implementations§
Source§impl Clone for PersistenceEngine
impl Clone for PersistenceEngine
Source§fn clone(&self) -> PersistenceEngine
fn clone(&self) -> PersistenceEngine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PersistenceEngine
impl !RefUnwindSafe for PersistenceEngine
impl Send for PersistenceEngine
impl Sync for PersistenceEngine
impl Unpin for PersistenceEngine
impl !UnwindSafe for PersistenceEngine
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