pub struct LockBuilderInstance { /* private fields */ }Expand description
Represents a particular instance of a LockBuilder. It includes extra metadata of the
policy, required to successfully work in all scenarios involving multiple policies.
Implementations§
Source§impl LockBuilderInstance
impl LockBuilderInstance
Sourcepub fn expiration(self, expiration: Duration) -> Self
pub fn expiration(self, expiration: Duration) -> Self
Sets the time expiration time for the lock. An acquired lock will be considered lost once this time passes even if it was not released.
Indicates that the lock should not be isolated to the policy. The state will be shared across different policy instances and different policies that use the same lock ID.
Auto Trait Implementations§
impl Freeze for LockBuilderInstance
impl !RefUnwindSafe for LockBuilderInstance
impl !Send for LockBuilderInstance
impl !Sync for LockBuilderInstance
impl Unpin for LockBuilderInstance
impl !UnwindSafe for LockBuilderInstance
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