pub struct Cursor<'a, K: TrieKey, V> { /* private fields */ }Implementations§
Source§impl<'a, K: TrieKey, V> Cursor<'a, K, V>
impl<'a, K: TrieKey, V> Cursor<'a, K, V>
Sourcepub fn current(&self) -> Option<(&[u8], &V)>
pub fn current(&self) -> Option<(&[u8], &V)>
Return the key and value at the current cursor position.
Sourcepub fn current_index(&self) -> Option<usize>
pub fn current_index(&self) -> Option<usize>
Return just the key index at the current cursor position, skipping key buffer and value reads. Useful when only the position matters.
Sourcepub fn next(&mut self) -> Option<(&[u8], &V)>
pub fn next(&mut self) -> Option<(&[u8], &V)>
Advance to the next key in sorted order, returning key and value.
Sourcepub fn prev(&mut self) -> Option<(&[u8], &V)>
pub fn prev(&mut self) -> Option<(&[u8], &V)>
Move to the previous key in sorted order, returning key and value.
Sourcepub fn next_index(&mut self) -> Option<usize>
pub fn next_index(&mut self) -> Option<usize>
Advance to the next key, returning only its index.
Sourcepub fn prev_index(&mut self) -> Option<usize>
pub fn prev_index(&mut self) -> Option<usize>
Move to the previous key, returning only its index.
pub fn seek(&mut self, key: &[u8]) -> Option<(&[u8], &V)>
Auto Trait Implementations§
impl<'a, K, V> Freeze for Cursor<'a, K, V>
impl<'a, K, V> RefUnwindSafe for Cursor<'a, K, V>
impl<'a, K, V> Send for Cursor<'a, K, V>
impl<'a, K, V> Sync for Cursor<'a, K, V>
impl<'a, K, V> Unpin for Cursor<'a, K, V>
impl<'a, K, V> UnsafeUnpin for Cursor<'a, K, V>
impl<'a, K, V> UnwindSafe for Cursor<'a, K, V>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more