pub struct Locker { /* private fields */ }
Implementations§
Source§impl Locker
impl Locker
pub async fn from_redis_url(url: &str) -> Result<Self>
Sourcepub async fn acquire<K>(&mut self, lock_keys: &K) -> Result<Lock>
pub async fn acquire<K>(&mut self, lock_keys: &K) -> Result<Lock>
Acquires a lock for the given key(s).
§Arguments
lock_keys
- A single key or a collection of keys to be locked.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Locker
impl !RefUnwindSafe for Locker
impl Send for Locker
impl Sync for Locker
impl Unpin for Locker
impl !UnwindSafe for Locker
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