pub(crate) trait Cursor<'a, T>: Send {
// Required methods
fn state(&self) -> &State<'a>;
fn state_mut(&mut self) -> &mut State<'a>;
fn count(&self) -> (usize, Option<usize>);
fn fetch(&self) -> Option<T>;
fn seek(&mut self);
// Provided methods
fn get(&self) -> Option<Result<T>> { ... }
fn seek_and_get(&mut self) -> Option<Result<T>> { ... }
}Expand description
Defines the polling operations shared by database cursor streams.
Implementations position a State, fetch one borrowed item, and surface
RocksDB cursor errors. Borrowed items remain valid only until the next
cursor movement and must be owned before they are retained.
Required Methods§
fn state(&self) -> &State<'a>
fn state_mut(&mut self) -> &mut State<'a>
fn count(&self) -> (usize, Option<usize>)
fn fetch(&self) -> Option<T>
fn seek(&mut self)
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".