pub struct ListParams {
pub page: Option<usize>,
pub per_page: Option<usize>,
pub sort: Option<String>,
pub order: Option<SortOrder>,
pub search: Option<String>,
pub filters: HashMap<String, String>,
}Expand description
Parameters for list view
Fields§
§page: Option<usize>Current page (1-indexed)
per_page: Option<usize>Items per page
sort: Option<String>Sort field
order: Option<SortOrder>Sort direction
search: Option<String>Search query
filters: HashMap<String, String>Filters
Implementations§
Source§impl ListParams
impl ListParams
Sourcepub fn resolve_per_page(&self, config: &AdminConfig) -> usize
pub fn resolve_per_page(&self, config: &AdminConfig) -> usize
Resolve the effective page size, honoring the requested per_page, the
config default (items_per_page), and the cap (max_items_per_page).
Sourcepub fn resolve_offset(&self, per_page: usize) -> usize
pub fn resolve_offset(&self, per_page: usize) -> usize
Compute the row offset for a resolved page size.
Trait Implementations§
Source§impl Clone for ListParams
impl Clone for ListParams
Source§fn clone(&self) -> ListParams
fn clone(&self) -> ListParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ListParams
impl Debug for ListParams
Source§impl Default for ListParams
impl Default for ListParams
Source§fn default() -> ListParams
fn default() -> ListParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ListParams
impl<'de> Deserialize<'de> for ListParams
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 ListParams
impl RefUnwindSafe for ListParams
impl Send for ListParams
impl Sync for ListParams
impl Unpin for ListParams
impl UnsafeUnpin for ListParams
impl UnwindSafe for ListParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<R, D> DepsPresent<D> for R
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging