#[non_exhaustive]pub enum UnreadablePolicy {
Fail,
QuarantineAfter {
attempts: u32,
},
}Expand description
What to do with a database that cannot be read (not corrupt: see the module docs).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fail
Return DbError::Unreadable; never touch the file. The default.
QuarantineAfter
Quarantine the file once reading it has failed attempts consecutive opens (counting the
current one; a value of 0 is treated as 1). Three or more is sensible: it means the
failure survived at least two restarts.
Trait Implementations§
Source§impl Clone for UnreadablePolicy
impl Clone for UnreadablePolicy
impl Copy for UnreadablePolicy
Source§impl Debug for UnreadablePolicy
impl Debug for UnreadablePolicy
Source§impl Default for UnreadablePolicy
impl Default for UnreadablePolicy
impl Eq for UnreadablePolicy
Source§impl PartialEq for UnreadablePolicy
impl PartialEq for UnreadablePolicy
impl StructuralPartialEq for UnreadablePolicy
Auto Trait Implementations§
impl Freeze for UnreadablePolicy
impl RefUnwindSafe for UnreadablePolicy
impl Send for UnreadablePolicy
impl Sync for UnreadablePolicy
impl Unpin for UnreadablePolicy
impl UnsafeUnpin for UnreadablePolicy
impl UnwindSafe for UnreadablePolicy
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