Struct redlock::Lock[][src]

pub struct Lock<'a> {
    pub resource: Vec<u8>,
    pub val: Vec<u8>,
    pub validity_time: usize,
    pub lock_manager: &'a RedLock,
}

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: usize

Time the lock is still valid. Should only be slightly smaller than the requested TTL.

lock_manager: &'a RedLock

Used to limit the lifetime of a lock to its lock manager.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.