Struct rs_consul::Lock [−][src]
pub struct Lock<'a> { pub session_id: String, pub key: String, pub timeout: Duration, pub namespace: String, pub datacenter: String, pub value: Option<Vec<u8>>, pub consul: &'a Consul, }
Expand description
Represents a lock against Consul. The lifetime of this object defines the validity of the lock against consul. When the object is dropped, the lock is attempted to be released for the next consumer.
Fields
session_id: String
The session ID of the lock.
key: String
The key for the lock.
timeout: Duration
The timeout of the session and the lock.
namespace: String
The namespace this lock exists in.
datacenter: String
The datacenter of this lock.
value: Option<Vec<u8>>
The data in this lock’s key
consul: &'a Consul
The consul client this lock was acquired using.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Lock<'a>
impl<'a> !UnwindSafe for Lock<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V