pub struct SortingParams { /* private fields */ }Implementations§
Source§impl SortingParams
impl SortingParams
pub fn new() -> Self
Sourcepub fn has_unsafe_fields(&self) -> bool
pub fn has_unsafe_fields(&self) -> bool
Check if there are any unsafe fields that need validation
Sourcepub fn with_allowed_columns(self, columns: &'static [&'static str]) -> Self
pub fn with_allowed_columns(self, columns: &'static [&'static str]) -> Self
Set allowed columns for unsafe field validation
Sourcepub fn validate_fields(&self) -> Result<(), String>
pub fn validate_fields(&self) -> Result<(), String>
Validate all unsafe fields against the whitelist
pub fn push(self, sort: Sort) -> Self
pub fn sort_by(self, field: impl Into<String>, direction: SortDirection) -> Self
pub fn asc(self, field: impl Into<String>) -> Self
pub fn desc(self, field: impl Into<String>) -> Self
pub fn is_empty(&self) -> bool
Sourcepub fn apply_nulls_first(self) -> Self
pub fn apply_nulls_first(self) -> Self
Apply NULLS FIRST to the last added sort
Sourcepub fn apply_nulls_last(self) -> Self
pub fn apply_nulls_last(self) -> Self
Apply NULLS LAST to the last added sort
Sourcepub fn apply_nulls_default(self) -> Self
pub fn apply_nulls_default(self) -> Self
Apply default null ordering to the last added sort
Sourcepub fn extend_with(self, other: SortingParams) -> Self
pub fn extend_with(self, other: SortingParams) -> Self
Combine with another SortingParams, extending the sorts list
Trait Implementations§
Source§impl Clone for SortingParams
impl Clone for SortingParams
Source§fn clone(&self) -> SortingParams
fn clone(&self) -> SortingParams
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 SortingParams
impl Debug for SortingParams
Source§impl Default for SortingParams
impl Default for SortingParams
Source§fn default() -> SortingParams
fn default() -> SortingParams
Returns the “default value” for a type. Read more
Source§impl IntoParams for SortingParams
impl IntoParams for SortingParams
fn into_params(self) -> Params
Auto Trait Implementations§
impl Freeze for SortingParams
impl RefUnwindSafe for SortingParams
impl Send for SortingParams
impl Sync for SortingParams
impl Unpin for SortingParams
impl UnwindSafe for SortingParams
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