Struct tikv_kv::Cursor[][src]

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

Fields

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

Implementations

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

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

fn mark_unread(&self)[src]

Mark key and value as unread. It will be invoked once cursor is moved.

fn mark_key_read(&self) -> bool[src]

Mark key as read. Returns whether key was marked as read before this call.

fn mark_value_read(&self) -> bool[src]

Mark value as read. Returns whether value was marked as read before this call.

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

pub fn near_seek(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool>
[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]>>
[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>
[src]

pub fn near_seek_for_prev(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool>
[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>
[src]

pub fn near_reverse_seek(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool>
[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>
[src]

pub fn internal_seek_for_prev(
    &mut self,
    key: &Key,
    statistics: &mut CfStatistics
) -> Result<bool>
[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>[src]

fn handle_error_status(&self, e: Error) -> Result<()>[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]