pub trait TimelineStore: Send + Sync {
// Required method
fn timeline(
&self,
query: TimelineQuery,
) -> BoxFuture<'_, Result<Vec<EventRecord>, StoreError>>;
}Expand description
The printer-wide reading of the event log.
Every method is asynchronous, the trait is dyn-compatible, and it is
shareable across threads, because its consumers hold it behind
Arc<dyn TimelineStore>.
Required Methods§
Sourcefn timeline(
&self,
query: TimelineQuery,
) -> BoxFuture<'_, Result<Vec<EventRecord>, StoreError>>
fn timeline( &self, query: TimelineQuery, ) -> BoxFuture<'_, Result<Vec<EventRecord>, StoreError>>
Read the events of the printer timeline, across every print and none.
Answers only events of TIMELINE_KINDS,
newest first by (received_at, id). An empty kinds means every
timeline kind; since and until are inclusive; spool_id keeps only
events whose payload names that spool — carries its identifier as a
string value anywhere in it; and before keeps only events strictly
older than that event. The limit is resolved by
resolve_history_limit.
§Errors
Refuses a kind outside the timeline with
StoreError::ConstraintRefused naming timeline.kinds, a limit above
MAX_HISTORY_LIMIT with StoreError::LimitRefused, and a cursor
naming no event with StoreError::NotFound.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".