pub struct CursorPage<T> {
pub items: Vec<T>,
pub next_cursor: Option<String>,
}Expand description
A single page of cursor (keyset) paginated results.
Unlike Page, there is no total_items/total_pages — computing those
would require a separate COUNT(*) query, which is exactly what keyset
pagination avoids. All you get (and all you need to fetch the next page)
is next_cursor.
Fields§
§items: Vec<T>§next_cursor: Option<String>Opaque cursor to pass back for the next page. None means this is the last page.
Implementations§
Source§impl<T> CursorPage<T>
impl<T> CursorPage<T>
Trait Implementations§
Source§impl<T: Clone> Clone for CursorPage<T>
impl<T: Clone> Clone for CursorPage<T>
Source§impl<T: Debug> Debug for CursorPage<T>
impl<T: Debug> Debug for CursorPage<T>
Source§impl<T: PartialEq> PartialEq for CursorPage<T>
impl<T: PartialEq> PartialEq for CursorPage<T>
impl<T: PartialEq> StructuralPartialEq for CursorPage<T>
Auto Trait Implementations§
impl<T> Freeze for CursorPage<T>
impl<T> RefUnwindSafe for CursorPage<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for CursorPage<T>
impl<T> Sync for CursorPage<T>
impl<T> Unpin for CursorPage<T>
impl<T> UnsafeUnpin for CursorPage<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for CursorPage<T>where
Vec<T>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more