pub struct TimelineQuery {
pub kinds: Vec<EventKind>,
pub since: Option<Timestamp>,
pub until: Option<Timestamp>,
pub spool_id: Option<SpoolId>,
pub before: Option<EventId>,
pub limit: Option<u32>,
}Expand description
Which timeline events to read.
An empty kinds means every kind of
TIMELINE_KINDS, and an absent limit
means DEFAULT_HISTORY_WINDOW.
Fields§
§kinds: Vec<EventKind>The kinds to read; empty means every timeline kind, and a kind outside the timeline is refused.
since: Option<Timestamp>The earliest instant to read from, inclusive.
until: Option<Timestamp>The latest instant to read to, inclusive.
spool_id: Option<SpoolId>Only events whose payload names this spool.
before: Option<EventId>The cursor: only events strictly older than this one.
limit: Option<u32>How many events to answer; absent means DEFAULT_HISTORY_WINDOW.
Implementations§
Source§impl TimelineQuery
impl TimelineQuery
Sourcepub fn resolved_limit(&self) -> Result<u32, StoreError>
pub fn resolved_limit(&self) -> Result<u32, StoreError>
The limit this query resolves to.
§Errors
Returns StoreError::LimitRefused when the limit asked for is above
MAX_HISTORY_LIMIT.
Sourcepub fn resolved_kinds(&self) -> Result<Vec<EventKind>, StoreError>
pub fn resolved_kinds(&self) -> Result<Vec<EventKind>, StoreError>
The kinds this query reads: those asked for, or every timeline kind.
§Errors
Returns StoreError::ConstraintRefused naming timeline.kinds when a
kind asked for is not one of
TIMELINE_KINDS.