pub struct ReadOptions {
pub lock_mode: LockMode,
pub cache_mode: Option<CacheMode>,
}Expand description
Options for read operations.
Specifies optional parameters that control read behavior, including locking and caching.
Fields§
§lock_mode: LockModeLock mode for the read operation.
cache_mode: Option<CacheMode>Cache mode for the read operation.
Implementations§
Source§impl ReadOptions
impl ReadOptions
Sourcepub fn with_lock_mode(self, lock_mode: LockMode) -> Self
pub fn with_lock_mode(self, lock_mode: LockMode) -> Self
Sets the lock mode.
Sourcepub fn with_cache_mode(self, cache_mode: CacheMode) -> Self
pub fn with_cache_mode(self, cache_mode: CacheMode) -> Self
Sets the cache mode.
Sourcepub fn read_uncommitted() -> Self
pub fn read_uncommitted() -> Self
Creates ReadOptions for read-uncommitted (dirty read).
Sourcepub fn read_modify_write() -> Self
pub fn read_modify_write() -> Self
Creates ReadOptions for read-modify-write.
Sourcepub fn evict_after_read() -> Self
pub fn evict_after_read() -> Self
Creates ReadOptions with evict-after-read cache mode.
Trait Implementations§
Source§impl Clone for ReadOptions
impl Clone for ReadOptions
Source§fn clone(&self) -> ReadOptions
fn clone(&self) -> ReadOptions
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 moreSource§impl Debug for ReadOptions
impl Debug for ReadOptions
Source§impl Default for ReadOptions
impl Default for ReadOptions
impl Eq for ReadOptions
Source§impl PartialEq for ReadOptions
impl PartialEq for ReadOptions
Source§fn eq(&self, other: &ReadOptions) -> bool
fn eq(&self, other: &ReadOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReadOptions
Auto Trait Implementations§
impl Freeze for ReadOptions
impl RefUnwindSafe for ReadOptions
impl Send for ReadOptions
impl Sync for ReadOptions
impl Unpin for ReadOptions
impl UnsafeUnpin for ReadOptions
impl UnwindSafe for ReadOptions
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.