pub struct CursorPage<T: Serialize> {
pub items: Vec<T>,
pub next_cursor: Option<String>,
pub has_more: bool,
pub per_page: i64,
}Expand description
Cursor-based page response.
Uses keyset (cursor) pagination rather than offset-based. The
next_cursor value should be passed back as the after parameter
for the next page.
Fields§
§items: Vec<T>The items for this page.
next_cursor: Option<String>Cursor value for fetching the next page, or None if this is the last page.
has_more: boolWhether more items exist beyond this page.
per_page: i64Number of items per page.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for CursorPage<T>
impl<T> RefUnwindSafe for CursorPage<T>where
T: RefUnwindSafe,
impl<T> Send for CursorPage<T>where
T: Send,
impl<T> Sync for CursorPage<T>where
T: Sync,
impl<T> Unpin for CursorPage<T>where
T: Unpin,
impl<T> UnsafeUnpin for CursorPage<T>
impl<T> UnwindSafe for CursorPage<T>where
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