pub struct PaginationConfig {
pub default_per_page: u64,
pub max_per_page: u64,
pub default_page: u64,
}Expand description
Configuration for pagination behavior.
Use this to customize default values and limits for pagination.
Fields§
§default_per_page: u64Default items per page when not specified.
max_per_page: u64Maximum allowed items per page.
default_page: u64Default page number (usually 1).
Implementations§
Source§impl PaginationConfig
impl PaginationConfig
Sourcepub fn default_per_page(self, value: u64) -> Self
pub fn default_per_page(self, value: u64) -> Self
Set the default items per page.
Sourcepub fn max_per_page(self, value: u64) -> Self
pub fn max_per_page(self, value: u64) -> Self
Set the maximum items per page.
Sourcepub fn default_page(self, value: u64) -> Self
pub fn default_page(self, value: u64) -> Self
Set the default page number.
Trait Implementations§
Source§impl Clone for PaginationConfig
impl Clone for PaginationConfig
Source§fn clone(&self) -> PaginationConfig
fn clone(&self) -> PaginationConfig
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 PaginationConfig
impl Debug for PaginationConfig
Source§impl Default for PaginationConfig
impl Default for PaginationConfig
impl Copy for PaginationConfig
Auto Trait Implementations§
impl Freeze for PaginationConfig
impl RefUnwindSafe for PaginationConfig
impl Send for PaginationConfig
impl Sync for PaginationConfig
impl Unpin for PaginationConfig
impl UnwindSafe for PaginationConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).