#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ExpectedVersion {
NoStream,
Exact(i64),
Any,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum ReadDirection {
#[default]
Forward,
Backward,
}
#[derive(Debug, Clone)]
pub struct StreamQuery {
pub direction: ReadDirection,
pub from_version: i64,
pub limit: i64,
}
impl Default for StreamQuery {
fn default() -> Self {
Self {
direction: ReadDirection::Forward,
from_version: 0,
limit: 1000,
}
}
}