Skip to main content

paginate

Function paginate 

Source
pub fn paginate<T: Clone>(
    items: &[T],
    offset: u64,
    limit: u64,
) -> (Vec<T>, u64, Option<u64>)
Expand description

Apply offset/limit pagination to a slice and compute next_offset.

Returns (page, total_matching, next_offset).