pub struct Lock<'a> {
pub resource: Vec<u8>,
pub val: Vec<u8>,
pub validity_time: usize,
pub lock_manager: &'a LockManager,
}Fields§
§resource: Vec<u8>The resource to lock. Will be used as the key in Redis.
val: Vec<u8>The value for this lock.
validity_time: usizeTime the lock is still valid. Should only be slightly smaller than the requested TTL.
lock_manager: &'a LockManagerUsed to limit the lifetime of a lock to its lock manager.
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Lock<'a>
impl<'a> Send for Lock<'a>
impl<'a> Sync for Lock<'a>
impl<'a> Unpin for Lock<'a>
impl<'a> UnwindSafe for Lock<'a>
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