1//! The set of possible iteration methods for the different iterators.
23use crate::cursor::MoveOperation;
45/// The trait used to define the way iterators behave.
6pub trait IterationMethod {
7/// The internal operation to move the cursor through entries.
8const MOVE_OPERATION: MoveOperation;
9}
1011/// Moves to the next or previous key if there
12/// are no more values associated with the current key.
13#[derive(Debug, Clone, Copy)]
14pub enum MoveThroughDuplicateValues {}
1516impl IterationMethod for MoveThroughDuplicateValues {
17const MOVE_OPERATION: MoveOperation = MoveOperation::Any;
18}
1920/// Moves between keys and ignores the duplicate values of keys.
21#[derive(Debug, Clone, Copy)]
22pub enum MoveBetweenKeys {}
2324impl IterationMethod for MoveBetweenKeys {
25const MOVE_OPERATION: MoveOperation = MoveOperation::NoDup;
26}
2728/// Moves only on the duplicate values of a given key and ignores other keys.
29#[derive(Debug, Clone, Copy)]
30pub enum MoveOnCurrentKeyDuplicates {}
3132impl IterationMethod for MoveOnCurrentKeyDuplicates {
33const MOVE_OPERATION: MoveOperation = MoveOperation::Dup;
34}