pub struct SortBuilder<P = (), S = Safe> { /* private fields */ }Implementations§
Source§impl SortBuilder<(), Safe>
impl SortBuilder<(), Safe>
Source§impl<P> SortBuilder<P, Safe>
impl<P> SortBuilder<P, Safe>
Sourcepub fn asc(self, field: &'static str) -> Self
pub fn asc(self, field: &'static str) -> Self
Safe ASC ordering - only accepts static string literals (compile-time safe)
Sourcepub fn desc(self, field: &'static str) -> Self
pub fn desc(self, field: &'static str) -> Self
Safe DESC ordering - only accepts static string literals (compile-time safe)
Sourcepub fn with_allowed_columns(
self,
allowed_columns: &'static [&'static str],
) -> SortBuilder<P, Unsafe>
pub fn with_allowed_columns( self, allowed_columns: &'static [&'static str], ) -> SortBuilder<P, Unsafe>
Switch to unsafe mode with column whitelist for dynamic strings
Source§impl SortBuilder<(), Unsafe>
impl SortBuilder<(), Unsafe>
Sourcepub fn build(self) -> Option<SortingParams>
pub fn build(self) -> Option<SortingParams>
Finish and return only the sorting params
Source§impl<P> SortBuilder<P, Unsafe>
impl<P> SortBuilder<P, Unsafe>
Sourcepub fn asc_unsafe(self, field: impl Into<String>) -> Self
pub fn asc_unsafe(self, field: impl Into<String>) -> Self
Unsafe ASC ordering - accepts dynamic strings (validation deferred to runtime)
Sourcepub fn desc_unsafe(self, field: impl Into<String>) -> Self
pub fn desc_unsafe(self, field: impl Into<String>) -> Self
Unsafe DESC ordering - accepts dynamic strings (validation deferred to runtime)
Source§impl<P, S> SortBuilder<P, S>
impl<P, S> SortBuilder<P, S>
Sourcepub fn nulls_first(self) -> Self
pub fn nulls_first(self) -> Self
Apply NULLS FIRST to the last added sort
Sourcepub fn nulls_last(self) -> Self
pub fn nulls_last(self) -> Self
Apply NULLS LAST to the last added sort
Sourcepub fn nulls_default(self) -> Self
pub fn nulls_default(self) -> Self
Apply default null ordering to the last added sort
Trait Implementations§
Source§impl<S> Debug for SortBuilder<(), S>
impl<S> Debug for SortBuilder<(), S>
Source§impl Default for SortBuilder<(), Safe>
impl Default for SortBuilder<(), Safe>
Source§impl<S> IntoParams for SortBuilder<(), S>
impl<S> IntoParams for SortBuilder<(), S>
fn into_params(self) -> Params
Auto Trait Implementations§
impl<P, S> Freeze for SortBuilder<P, S>where
P: Freeze,
impl<P, S> RefUnwindSafe for SortBuilder<P, S>where
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<P, S> Send for SortBuilder<P, S>
impl<P, S> Sync for SortBuilder<P, S>
impl<P, S> Unpin for SortBuilder<P, S>
impl<P, S> UnwindSafe for SortBuilder<P, S>where
P: UnwindSafe,
S: UnwindSafe,
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