pub struct Page<T> {
pub count: u64,
pub next: Option<String>,
pub previous: Option<String>,
pub page_metadata: Option<Value>,
pub cursor: Option<String>,
pub results: Vec<T>,
}Expand description
A single page of results from a list endpoint.
next/previous are the server-supplied URLs to the adjacent pages;
cursor is the keyset cursor extracted from next for convenience (empty
on offset-paginated endpoints).
Fields§
§count: u64Total number of items across all pages, when the server reports it.
For some endpoints this matches results.len().
next: Option<String>URL of the next page, or None when on the last page.
previous: Option<String>URL of the previous page, or None when on the first page.
page_metadata: Option<Value>Opaque page metadata for keyset endpoints.
cursor: Option<String>Cursor extracted from next on cursor-paginated endpoints. Pass it
back via the cursor option to fetch the next page. Empty when the
endpoint is offset-paginated or no cursor is set.
results: Vec<T>The actual data for this page.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Page<T>
impl<T> RefUnwindSafe for Page<T>where
T: RefUnwindSafe,
impl<T> Send for Page<T>where
T: Send,
impl<T> Sync for Page<T>where
T: Sync,
impl<T> Unpin for Page<T>where
T: Unpin,
impl<T> UnsafeUnpin for Page<T>
impl<T> UnwindSafe for Page<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