pub struct VariableLockBuilder { /* private fields */ }
Expand description
Builder for VariableLock
.
Implementations§
Source§impl VariableLockBuilder
impl VariableLockBuilder
Sourcepub fn lock_delay(&mut self, value: String) -> &mut Self
pub fn lock_delay(&mut self, value: String) -> &mut Self
LockDelay describes a grace period that exists after a lock is lost, before another client may acquire the lock. This helps protect against split-brains. This is a string version of a time.Duration like “2m”.
Sourcepub fn id(&mut self, value: String) -> &mut Self
pub fn id(&mut self, value: String) -> &mut Self
ID is generated by Nomad to provide a unique caller ID which can be used for renewals and unlocking.
Sourcepub fn ttl(&mut self, value: String) -> &mut Self
pub fn ttl(&mut self, value: String) -> &mut Self
TTL describes the time-to-live of the current lock holder. This is a string version of a time.Duration like “2m”.
Sourcepub fn build(&self) -> Result<VariableLock, VariableLockBuilderError>
pub fn build(&self) -> Result<VariableLock, VariableLockBuilderError>
Trait Implementations§
Source§impl Clone for VariableLockBuilder
impl Clone for VariableLockBuilder
Source§fn clone(&self) -> VariableLockBuilder
fn clone(&self) -> VariableLockBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for VariableLockBuilder
impl RefUnwindSafe for VariableLockBuilder
impl Send for VariableLockBuilder
impl Sync for VariableLockBuilder
impl Unpin for VariableLockBuilder
impl UnwindSafe for VariableLockBuilder
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