Struct ckb_db::ReadOptions[][src]

pub struct ReadOptions { /* fields omitted */ }

Implementations

impl ReadOptions[src]

pub fn set_snapshot<T>(&mut self, snapshot: &T) where
    T: ConstHandle<rocksdb_snapshot_t>, 
[src]

pub fn set_iterate_upper_bound<K>(&mut self, key: K) where
    K: AsRef<[u8]>, 
[src]

pub fn set_iterate_lower_bound<K>(&mut self, key: K) where
    K: AsRef<[u8]>, 
[src]

pub fn set_prefix_same_as_start(&mut self, v: bool)[src]

pub fn set_total_order_seek(&mut self, v: bool)[src]

pub fn set_readahead_size(&mut self, v: usize)[src]

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>
[src]

Trait Implementations

impl Clone for ReadOptions[src]

pub fn clone(&self) -> ReadOptions[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for ReadOptions[src]

pub fn default() -> ReadOptions[src]

Returns the “default value” for a type. Read more

impl Drop for ReadOptions[src]

pub fn drop(&mut self)[src]

Executes the destructor for this type. Read more

impl<T> GetCF<ReadOptions> for T where
    T: Handle<rocksdb_t> + Read
[src]

pub fn get_cf_full<K>(
    &self,
    cf: Option<&ColumnFamily>,
    key: K,
    readopts: Option<&ReadOptions>
) -> Result<Option<DBVector>, Error> where
    K: AsRef<[u8]>, 
[src]

fn get_cf<K>(
    &self,
    cf: &ColumnFamily,
    key: K
) -> Result<Option<DBVector>, Error> where
    K: AsRef<[u8]>, 
[src]

fn get_cf_opt<K>(
    &self,
    cf: &ColumnFamily,
    key: K,
    readopts: &R
) -> Result<Option<DBVector>, Error> where
    K: AsRef<[u8]>, 
[src]

impl Handle<rocksdb_readoptions_t> for ReadOptions[src]

pub fn handle(&self) -> *mut rocksdb_readoptions_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> AsAny for T where
    T: Any

pub fn as_any(&self) -> &(dyn Any + 'static)

TODO(doc): @quake

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V