pub trait CursorValues {
// Required methods
fn len(&self) -> usize;
fn eq(l: &Self, l_idx: usize, r: &Self, r_idx: usize) -> bool;
fn eq_to_previous(cursor: &Self, idx: usize) -> bool;
fn compare(l: &Self, l_idx: usize, r: &Self, r_idx: usize) -> Ordering;
}Expand description
A comparable collection of values for use with Cursor
This is a trait as there are several specialized implementations, such as for
single columns or for normalized multi column keys ([Rows])
Required Methods§
fn len(&self) -> usize
Sourcefn eq(l: &Self, l_idx: usize, r: &Self, r_idx: usize) -> bool
fn eq(l: &Self, l_idx: usize, r: &Self, r_idx: usize) -> bool
Returns true if l[l_idx] == r[r_idx]
Sourcefn eq_to_previous(cursor: &Self, idx: usize) -> bool
fn eq_to_previous(cursor: &Self, idx: usize) -> bool
Returns true if row[idx] == row[idx - 1]
Given idx should be greater than 0
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.