pub struct QueryParams {
pub limit: Option<u32>,
pub offset: Option<u32>,
pub epoch: Option<u64>,
pub sort_order: Option<String>,
}Expand description
Query parameters for paginated requests
Fields§
§limit: Option<u32>Limit number of results
offset: Option<u32>Offset for pagination
epoch: Option<u64>Epoch filter
sort_order: Option<String>Sort order (asc/desc)
Implementations§
Source§impl QueryParams
impl QueryParams
Sourcepub fn with_limit(limit: u32) -> Self
pub fn with_limit(limit: u32) -> Self
Create new query params with limit
Sourcepub fn with_epoch(epoch: u64) -> Self
pub fn with_epoch(epoch: u64) -> Self
Create new query params with epoch
Sourcepub fn to_query_string(&self) -> String
pub fn to_query_string(&self) -> String
Convert to query string
Trait Implementations§
Source§impl Clone for QueryParams
impl Clone for QueryParams
Source§fn clone(&self) -> QueryParams
fn clone(&self) -> QueryParams
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 QueryParams
impl Debug for QueryParams
Source§impl Default for QueryParams
impl Default for QueryParams
Source§fn default() -> QueryParams
fn default() -> QueryParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for QueryParams
impl RefUnwindSafe for QueryParams
impl Send for QueryParams
impl Sync for QueryParams
impl Unpin for QueryParams
impl UnwindSafe for QueryParams
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