pub struct PaginationParams {
pub page: Option<u32>,
pub limit: Option<u32>,
pub offset: Option<u32>,
}
Expand description
Pagination parameters
Fields§
§page: Option<u32>
Page number (1-based)
limit: Option<u32>
Items per page
offset: Option<u32>
Offset (alternative to page)
Implementations§
Source§impl PaginationParams
impl PaginationParams
Sourcepub fn with_limit(self, limit: u32) -> Self
pub fn with_limit(self, limit: u32) -> Self
Set limit
Sourcepub fn with_offset(self, offset: u32) -> Self
pub fn with_offset(self, offset: u32) -> Self
Set offset
Sourcepub fn to_query_params(&self) -> Vec<(String, String)>
pub fn to_query_params(&self) -> Vec<(String, String)>
Convert to query parameters
Trait Implementations§
Source§impl Clone for PaginationParams
impl Clone for PaginationParams
Source§fn clone(&self) -> PaginationParams
fn clone(&self) -> PaginationParams
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 PaginationParams
impl Debug for PaginationParams
Source§impl Default for PaginationParams
impl Default for PaginationParams
Source§fn default() -> PaginationParams
fn default() -> PaginationParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PaginationParams
impl<'de> Deserialize<'de> for PaginationParams
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 PaginationParams
impl RefUnwindSafe for PaginationParams
impl Send for PaginationParams
impl Sync for PaginationParams
impl Unpin for PaginationParams
impl UnwindSafe for PaginationParams
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