pub fn paginate_cursor<'a, T, F>(
items: &'a [T],
cursor: Option<&str>,
limit: usize,
key: F,
) -> (Vec<&'a T>, Option<String>)Expand description
Cursor-based pagination for list endpoints.
Finds the cursor in items (by comparing key(item) to cursor),
skips it, takes limit items, and returns (page, next_cursor).
If cursor is None, starts from the beginning.