Expand description
Cursor-based pagination for event queries.
This module provides GraphQL-style cursor pagination for efficiently querying large sets of events. It uses keyset pagination for stable, efficient results.
§Key Types
Value- Base64-encoded cursor stringArgs- Pagination arguments (first/after, last/before)ReadResult- Paginated result with edges and page infoReader- In-memory pagination executor
§Example
ⓘ
use evento::cursor::{Args, Reader};
// Forward pagination: first 10 events
let args = Args::forward(10, None);
// Continue from cursor
let args = Args::forward(10, Some(page_info.end_cursor));
// Backward pagination: last 10 events before cursor
let args = Args::backward(10, Some(cursor));
// In-memory pagination
let result = Reader::new(events)
.forward(10, None)
.execute()?;Structs§
- Args
- Pagination arguments for querying events.
- Edge
- A paginated item with its cursor.
- Page
Info - Pagination metadata for a result set.
- Read
Result - Result of a paginated query.
- Reader
- In-memory pagination executor.
- Value
- A base64-encoded cursor value for pagination.
Enums§
- Cursor
Error - Order
- Sort order for pagination.
- Read
Error