Struct ckb_db::ReadOptions
source · [−]pub struct ReadOptions { /* private fields */ }
Implementations
sourceimpl ReadOptions
impl ReadOptions
pub fn set_snapshot<T>(&mut self, snapshot: &T) where
T: ConstHandle<rocksdb_snapshot_t>,
pub fn set_iterate_upper_bound<K>(&mut self, key: K) where
K: AsRef<[u8]>,
pub fn set_iterate_lower_bound<K>(&mut self, key: K) where
K: AsRef<[u8]>,
pub fn set_prefix_same_as_start(&mut self, v: bool)
pub fn set_total_order_seek(&mut self, v: bool)
sourcepub fn set_readahead_size(&mut self, v: usize)
pub fn set_readahead_size(&mut self, v: usize)
If non-zero, an iterator will create a new table reader which performs reads of the given size. Using a large size (> 2MB) can improve the performance of forward iteration on spinning disks. Default: 0
use ckb_rocksdb::{ReadOptions};
let mut opts = ReadOptions::default();
opts.set_readahead_size(4_194_304); // 4mb
pub fn input_or_default(
input: Option<&ReadOptions>,
default_readopts: &mut Option<ReadOptions>
) -> Result<*mut rocksdb_readoptions_t, Error>
Trait Implementations
sourceimpl Clone for ReadOptions
impl Clone for ReadOptions
sourcefn clone(&self) -> ReadOptions
fn clone(&self) -> ReadOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for ReadOptions
impl Default for ReadOptions
sourcefn default() -> ReadOptions
fn default() -> ReadOptions
Returns the “default value” for a type. Read more
sourceimpl Drop for ReadOptions
impl Drop for ReadOptions
sourceimpl<T> GetCF<ReadOptions> for T where
T: Handle<rocksdb_t> + Read,
impl<T> GetCF<ReadOptions> for T where
T: Handle<rocksdb_t> + Read,
fn get_cf_full<K>(
&self,
cf: Option<&ColumnFamily>,
key: K,
readopts: Option<&ReadOptions>
) -> Result<Option<DBVector>, Error> where
K: AsRef<[u8]>,
fn get_cf<K>(
&self,
cf: &ColumnFamily,
key: K
) -> Result<Option<DBVector>, Error> where
K: AsRef<[u8]>,
fn get_cf_opt<K>(
&self,
cf: &ColumnFamily,
key: K,
readopts: &R
) -> Result<Option<DBVector>, Error> where
K: AsRef<[u8]>,
Auto Trait Implementations
impl RefUnwindSafe for ReadOptions
impl !Send for ReadOptions
impl !Sync for ReadOptions
impl Unpin for ReadOptions
impl UnwindSafe for ReadOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more