pub struct PaginationConfig {
pub default_per_page: i64,
pub max_per_page: i64,
}Expand description
Pagination defaults applied by PageRequest and CursorRequest
extractors.
Add an instance to request extensions (via middleware or a layer) to
override the defaults. If absent, the extractors fall back to
default_per_page = 20 and max_per_page = 100.
Fields§
§default_per_page: i64Default number of items per page when per_page is not specified.
max_per_page: i64Maximum allowed value for per_page. Values above this are clamped.
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
Auto Trait Implementations§
impl Freeze for PaginationConfig
impl RefUnwindSafe for PaginationConfig
impl Send for PaginationConfig
impl Sync for PaginationConfig
impl Unpin for PaginationConfig
impl UnsafeUnpin 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