pub struct SortBuilder<P = (), S = Safe> { /* private fields */ }Implementations§
Source§impl SortBuilder
impl SortBuilder
Sourcepub fn new() -> SortBuilder
pub fn new() -> SortBuilder
Create as standalone (no parent) - Safe by default
Sourcepub fn build(self) -> Option<SortingParams>
pub fn build(self) -> Option<SortingParams>
Finish and return only the sorting params
Source§impl<P> SortBuilder<P>
impl<P> SortBuilder<P>
Sourcepub fn asc(self, field: &'static str) -> SortBuilder<P>
pub fn asc(self, field: &'static str) -> SortBuilder<P>
Safe ASC ordering - only accepts static string literals (compile-time safe)
Sourcepub fn desc(self, field: &'static str) -> SortBuilder<P>
pub fn desc(self, field: &'static str) -> SortBuilder<P>
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>) -> SortBuilder<P, Unsafe>
pub fn asc_unsafe(self, field: impl Into<String>) -> SortBuilder<P, Unsafe>
Unsafe ASC ordering - accepts dynamic strings (validation deferred to runtime)
Sourcepub fn desc_unsafe(self, field: impl Into<String>) -> SortBuilder<P, Unsafe>
pub fn desc_unsafe(self, field: impl Into<String>) -> SortBuilder<P, Unsafe>
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) -> SortBuilder<P, S>
pub fn nulls_first(self) -> SortBuilder<P, S>
Apply NULLS FIRST to the last added sort
Sourcepub fn nulls_last(self) -> SortBuilder<P, S>
pub fn nulls_last(self) -> SortBuilder<P, S>
Apply NULLS LAST to the last added sort
Sourcepub fn nulls_default(self) -> SortBuilder<P, S>
pub fn nulls_default(self) -> SortBuilder<P, S>
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
impl Default for SortBuilder
Source§fn default() -> SortBuilder
fn default() -> SortBuilder
Returns the “default value” for a type. Read more
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