Struct tikv::storage::kv::Cursor[][src]

pub struct Cursor<I> where
    I: Iterator
{ iter: I, scan_mode: ScanMode, prefix_seek: bool, min_key: Option<Vec<u8, Global>>, max_key: Option<Vec<u8, Global>>, cur_key_has_read: Cell<bool>, cur_value_has_read: Cell<bool>, }

Fields

iter: Iscan_mode: ScanModeprefix_seek: boolmin_key: Option<Vec<u8, Global>>max_key: Option<Vec<u8, Global>>cur_key_has_read: Cell<bool>cur_value_has_read: Cell<bool>

Implementations

impl<I> Cursor<I> where
    I: Iterator
[src]

pub fn new(iter: I, mode: ScanMode, prefix_seek: bool) -> Cursor<I>[src]

pub fn seek(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool, Error>
[src]

pub fn near_seek(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool, Error>
[src]

Seek the specified key.

This method assume the current position of cursor is around key, otherwise you should use seek instead.

pub fn get(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<Option<&[u8]>, Error>
[src]

Get the value of specified key.

This method assume the current position of cursor is around key, otherwise you should seek first.

pub fn seek_for_prev(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool, Error>
[src]

pub fn near_seek_for_prev(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool, Error>
[src]

Find the largest key that is not greater than the specific key.

pub fn reverse_seek(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool, Error>
[src]

pub fn near_reverse_seek(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool, Error>
[src]

Reverse seek the specified key.

This method assume the current position of cursor is around key, otherwise you should use reverse_seek instead.

pub fn key(&self, statistics: &mut CfStatistics) -> &[u8][src]

pub fn value(&self, statistics: &mut CfStatistics) -> &[u8][src]

pub fn seek_to_first(&mut self, statistics: &mut CfStatistics) -> bool[src]

pub fn seek_to_last(&mut self, statistics: &mut CfStatistics) -> bool[src]

pub fn internal_seek(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool, Error>
[src]

pub fn internal_seek_for_prev(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool, Error>
[src]

pub fn next(&mut self, statistics: &mut CfStatistics) -> bool[src]

pub fn prev(&mut self, statistics: &mut CfStatistics) -> bool[src]

pub fn valid(&self) -> Result<bool, Error>[src]

Auto Trait Implementations

impl<I> !RefUnwindSafe for Cursor<I>

impl<I> Send for Cursor<I>

impl<I> !Sync for Cursor<I>

impl<I> Unpin for Cursor<I> where
    I: Unpin

impl<I> UnwindSafe for Cursor<I> where
    I: UnwindSafe

Blanket Implementations

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

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

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

impl<V, W> ConvertFrom<W> for V where
    W: ConvertTo<V>, 
[src]

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

impl<T> Instrument for T[src]

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

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

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

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.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]