pub struct ReadOptions<'snap> {
pub verify_checksums: bool,
pub fill_cache: bool,
pub snapshot: Option<&'snap Snapshot<'snap>>,
}Expand description
Options that control read operations.
See include/leveldb/options.h.
Fields§
§verify_checksums: boolVerify block checksums on every read in this operation.
When set, every SSTable data block read for this get or iterator call has its CRC32c
checksum verified. Any mismatch returns Error::Corruption.
For database-wide verification without setting this on every ReadOptions, use
Options::paranoid_checks instead.
Default: false.
fill_cache: boolCache blocks read during this operation in the block cache.
Set to false for bulk scans to avoid polluting the cache with data that
is unlikely to be re-read soon (e.g. DbIter full-table scans).
Default: true.
snapshot: Option<&'snap Snapshot<'snap>>Read as of this snapshot’s sequence number.
None means “use an implicit snapshot of the current state”.
Trait Implementations§
Source§impl<'snap> Clone for ReadOptions<'snap>
impl<'snap> Clone for ReadOptions<'snap>
Source§fn clone(&self) -> ReadOptions<'snap>
fn clone(&self) -> ReadOptions<'snap>
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<'snap> Debug for ReadOptions<'snap>
impl<'snap> Debug for ReadOptions<'snap>
Source§impl Default for ReadOptions<'_>
impl Default for ReadOptions<'_>
impl<'snap> Copy for ReadOptions<'snap>
Auto Trait Implementations§
impl<'snap> Freeze for ReadOptions<'snap>
impl<'snap> !RefUnwindSafe for ReadOptions<'snap>
impl<'snap> Send for ReadOptions<'snap>
impl<'snap> Sync for ReadOptions<'snap>
impl<'snap> Unpin for ReadOptions<'snap>
impl<'snap> UnsafeUnpin for ReadOptions<'snap>
impl<'snap> !UnwindSafe for ReadOptions<'snap>
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