pub struct PageInfo { /* private fields */ }Expand description
Pagination metadata.
Implementations§
Source§impl PageInfo
impl PageInfo
Sourcepub const fn new(page: PageNumber, size: PageSize) -> Self
pub const fn new(page: PageNumber, size: PageSize) -> Self
Creates pagination metadata.
Sourcepub const fn with_total_count(self, total_count: u64) -> Self
pub const fn with_total_count(self, total_count: u64) -> Self
Adds a total count.
Sourcepub const fn with_has_more(self, has_more: bool) -> Self
pub const fn with_has_more(self, has_more: bool) -> Self
Sets whether a next page is available.
Trait Implementations§
impl Eq for PageInfo
impl StructuralPartialEq for PageInfo
Auto Trait Implementations§
impl Freeze for PageInfo
impl RefUnwindSafe for PageInfo
impl Send for PageInfo
impl Sync for PageInfo
impl Unpin for PageInfo
impl UnsafeUnpin for PageInfo
impl UnwindSafe for PageInfo
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