pub struct Pagination {
pub page: usize,
pub total_pages: usize,
pub per_page: usize,
pub total_items: usize,
pub has_prev: bool,
pub has_next: bool,
pub start_item: usize,
pub end_item: usize,
}Expand description
Pagination info
Fields§
§page: usizeCurrent page (1-indexed)
total_pages: usizeTotal pages
per_page: usizeItems per page
total_items: usizeTotal items
has_prev: boolHas previous page
has_next: boolHas next page
start_item: usizeStart item number (for display)
end_item: usizeEnd item number (for display)
Implementations§
Source§impl Pagination
impl Pagination
Sourcepub fn page_numbers(&self, window: usize) -> Vec<PageNumber>
pub fn page_numbers(&self, window: usize) -> Vec<PageNumber>
Get page numbers for pagination UI
Trait Implementations§
Source§impl Clone for Pagination
impl Clone for Pagination
Source§fn clone(&self) -> Pagination
fn clone(&self) -> Pagination
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Pagination
impl Debug for Pagination
Source§impl<'de> Deserialize<'de> for Pagination
impl<'de> Deserialize<'de> for Pagination
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Pagination
impl RefUnwindSafe for Pagination
impl Send for Pagination
impl Sync for Pagination
impl Unpin for Pagination
impl UnwindSafe for Pagination
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