pub struct LockStore { /* private fields */ }Implementations§
Source§impl LockStore
impl LockStore
pub fn local(root: impl Into<PathBuf>) -> Self
pub fn bucket(bucket: S3Store) -> Self
pub fn with_max_age(self, max_age: Option<Duration>) -> Self
pub fn max_age(&self) -> Option<Duration>
pub fn stale_for(&self, lock: &Lock) -> Option<Duration>
pub fn id_of(path: &str) -> String
pub async fn create( &self, ns: &Namespace, path: &str, owner: &str, ) -> Result<Lock, Error>
pub async fn get(&self, ns: &Namespace, id: &str) -> Result<Option<Lock>, Error>
pub async fn list(&self, ns: &Namespace) -> Result<Vec<Lock>, Error>
pub async fn remove(&self, ns: &Namespace, id: &str) -> Result<(), Error>
Auto Trait Implementations§
impl !RefUnwindSafe for LockStore
impl !UnwindSafe for LockStore
impl Freeze for LockStore
impl Send for LockStore
impl Sync for LockStore
impl Unpin for LockStore
impl UnsafeUnpin for LockStore
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