Struct tikv_kv::Cursor [−][src]
Fields
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>
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]
&mut self,
key: &Key,
statistics: &mut CfStatistics
) -> Result<bool>
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]
&mut self,
key: &Key,
statistics: &mut CfStatistics
) -> Result<Option<&[u8]>>
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]
&mut self,
key: &Key,
statistics: &mut CfStatistics
) -> Result<bool>
pub fn near_seek_for_prev(
&mut self,
key: &Key,
statistics: &mut CfStatistics
) -> Result<bool>
[src]
&mut self,
key: &Key,
statistics: &mut CfStatistics
) -> Result<bool>
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]
&mut self,
key: &Key,
statistics: &mut CfStatistics
) -> Result<bool>
pub fn near_reverse_seek(
&mut self,
key: &Key,
statistics: &mut CfStatistics
) -> Result<bool>
[src]
&mut self,
key: &Key,
statistics: &mut CfStatistics
) -> Result<bool>
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]
&mut self,
key: &Key,
statistics: &mut CfStatistics
) -> Result<bool>
pub fn internal_seek_for_prev(
&mut self,
key: &Key,
statistics: &mut CfStatistics
) -> Result<bool>
[src]
&mut self,
key: &Key,
statistics: &mut CfStatistics
) -> Result<bool>
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,
I: Unpin,
impl<I> UnwindSafe for Cursor<I> where
I: UnwindSafe,
I: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src]
W: ConvertTo<V>,
pub fn convert_from(ctx: &mut EvalContext, from: W) -> Result<V, Error>
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,