pub enum SyncPolicy {
Instant,
Periodic(Duration),
Manual,
}Expand description
Specifies how and when the database should be synchronized with the file system.
Variants§
Instant
The data are flushed to the file system instantly with every mutable operation. This is the default mode. This mode is the slowest, but the safest.
Periodic(Duration)
The data are flushed to the file system periodically by a thread that runs in the background.
Manual
The data are flushed to the file system manually when the Joydb::flush method is called. The only exception is on drop, which always flushes the data.
Trait Implementations§
Source§impl Clone for SyncPolicy
impl Clone for SyncPolicy
Source§fn clone(&self) -> SyncPolicy
fn clone(&self) -> SyncPolicy
Returns a copy 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 moreSource§impl Debug for SyncPolicy
impl Debug for SyncPolicy
Source§impl Hash for SyncPolicy
impl Hash for SyncPolicy
Source§impl PartialEq for SyncPolicy
impl PartialEq for SyncPolicy
impl Copy for SyncPolicy
impl Eq for SyncPolicy
impl StructuralPartialEq for SyncPolicy
Auto Trait Implementations§
impl Freeze for SyncPolicy
impl RefUnwindSafe for SyncPolicy
impl Send for SyncPolicy
impl Sync for SyncPolicy
impl Unpin for SyncPolicy
impl UnwindSafe for SyncPolicy
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