pub fn paginate<T: Clone>( items: &[T], offset: u64, limit: u64, ) -> (Vec<T>, u64, Option<u64>)
Apply offset/limit pagination to a slice and compute next_offset.
next_offset
Returns (page, total_matching, next_offset).
(page, total_matching, next_offset)