pub enum WaitPolicy {
Wait,
NoWait,
SkipLocked,
}Expand description
What a caller wants to happen when the lock it requests is not
immediately available. Mirrors PG’s LockWaitPolicy.
Variants§
Wait
Block until the lock is granted (the default DML behaviour and
bare FOR UPDATE).
NoWait
FOR UPDATE NOWAIT — fail immediately rather than block.
SkipLocked
FOR UPDATE SKIP LOCKED — skip this row rather than block.
Trait Implementations§
Source§impl Clone for WaitPolicy
impl Clone for WaitPolicy
Source§fn clone(&self) -> WaitPolicy
fn clone(&self) -> WaitPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WaitPolicy
Source§impl Debug for WaitPolicy
impl Debug for WaitPolicy
impl Eq for WaitPolicy
Source§impl PartialEq for WaitPolicy
impl PartialEq for WaitPolicy
impl StructuralPartialEq for WaitPolicy
Auto Trait Implementations§
impl Freeze for WaitPolicy
impl RefUnwindSafe for WaitPolicy
impl Send for WaitPolicy
impl Sync for WaitPolicy
impl Unpin for WaitPolicy
impl UnsafeUnpin for WaitPolicy
impl UnwindSafe for WaitPolicy
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