Skip to main content

LockGuard

Trait LockGuard 

Source
pub trait LockGuard: Send + Sync {
    // Required method
    fn release_sync(&mut self) -> Result<()>;
}
Expand description

Lock guard for tenant schema locks

When dropped, the lock should be automatically released. Note: This trait uses async methods, so it cannot be used as a trait object directly. Implementations should provide a concrete type that can be boxed and used with acquire_lock.

Required Methods§

Source

fn release_sync(&mut self) -> Result<()>

Explicitly release the lock

This should be called explicitly to release the lock. Some implementations may also release on drop, but it’s not guaranteed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§