pub struct GetOptions {
pub with_for_update: bool,
pub skip_locked: bool,
pub nowait: bool,
}Expand description
Options for Session::get_with_options().
Fields§
§with_for_update: boolIf true, use SELECT … FOR UPDATE to lock the row.
skip_locked: boolIf true, use SKIP LOCKED with FOR UPDATE (requires with_for_update).
nowait: boolIf true, use NOWAIT with FOR UPDATE (requires with_for_update).
Implementations§
Source§impl GetOptions
impl GetOptions
Sourcepub fn new() -> GetOptions
pub fn new() -> GetOptions
Create new default options.
Sourcepub fn with_for_update(self, value: bool) -> GetOptions
pub fn with_for_update(self, value: bool) -> GetOptions
Set the with_for_update option (builder pattern).
Sourcepub fn skip_locked(self, value: bool) -> GetOptions
pub fn skip_locked(self, value: bool) -> GetOptions
Set the skip_locked option (builder pattern).
Sourcepub fn nowait(self, value: bool) -> GetOptions
pub fn nowait(self, value: bool) -> GetOptions
Set the nowait option (builder pattern).
Trait Implementations§
Source§impl Clone for GetOptions
impl Clone for GetOptions
Source§fn clone(&self) -> GetOptions
fn clone(&self) -> GetOptions
Returns a duplicate 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 moreSource§impl Debug for GetOptions
impl Debug for GetOptions
Source§impl Default for GetOptions
impl Default for GetOptions
Source§fn default() -> GetOptions
fn default() -> GetOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GetOptions
impl RefUnwindSafe for GetOptions
impl Send for GetOptions
impl Sync for GetOptions
impl Unpin for GetOptions
impl UnwindSafe for GetOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).