pub struct OperationGuard { /* private fields */ }Expand description
RAII shared guard for one store operation on one database file.
Held for the duration of the operation; dropping it releases the lock.
Implementations§
Source§impl OperationGuard
impl OperationGuard
Sourcepub fn for_database(db_path: &Path) -> Result<Self, SqliteStoreError>
pub fn for_database(db_path: &Path) -> Result<Self, SqliteStoreError>
Acquire the shared guard for an operation on db_path.
Returns SqliteStoreError::MaintenanceFenceHeld when the exclusive
maintenance fence is held. In-memory databases and media where no
lock file can exist yield a no-op guard.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OperationGuard
impl RefUnwindSafe for OperationGuard
impl Send for OperationGuard
impl Sync for OperationGuard
impl Unpin for OperationGuard
impl UnsafeUnpin for OperationGuard
impl UnwindSafe for OperationGuard
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