pub struct Page<T: Serialize> {
pub items: Vec<T>,
pub total: i64,
pub page: i64,
pub per_page: i64,
pub total_pages: i64,
pub has_next: bool,
pub has_prev: bool,
}Expand description
Offset-based page response.
Contains the items for the current page plus metadata for navigating through the full result set. Pages are 1-based.
Constructed manually via Page::new.
Fields§
§items: Vec<T>The items for this page.
total: i64Total number of items across all pages.
page: i64Current page number (1-based).
per_page: i64Number of items per page.
total_pages: i64Total number of pages.
has_next: boolWhether a next page exists.
has_prev: boolWhether a previous page exists.
Implementations§
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