pub struct PaginationBuilder<T> { /* private fields */ }Expand description
Helper for building paginated responses
Implementations§
Source§impl<T> PaginationBuilder<T>
impl<T> PaginationBuilder<T>
Sourcepub fn new(items: Vec<T>) -> PaginationBuilder<T>
pub fn new(items: Vec<T>) -> PaginationBuilder<T>
Create a new pagination builder
Sourcepub fn with_limit(self, limit: u32) -> PaginationBuilder<T>
pub fn with_limit(self, limit: u32) -> PaginationBuilder<T>
Set the page limit
Sourcepub fn with_total(self, total: u64) -> PaginationBuilder<T>
pub fn with_total(self, total: u64) -> PaginationBuilder<T>
Set the total count
Auto Trait Implementations§
impl<T> Freeze for PaginationBuilder<T>
impl<T> RefUnwindSafe for PaginationBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for PaginationBuilder<T>where
T: Send,
impl<T> Sync for PaginationBuilder<T>where
T: Sync,
impl<T> Unpin for PaginationBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for PaginationBuilder<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