pub enum NullOrdering {
NullsMax,
NullsMin,
NullsFirst,
NullsLast,
}
Expand description
Represents the null ordering for sorting expressions.
Variants§
NullsMax
Nulls appear last in ascending order.
NullsMin
Nulls appear first in descending order.
NullsFirst
Nulls appear first.
NullsLast
Nulls appear last.
Implementations§
Source§impl NullOrdering
impl NullOrdering
Sourcepub fn nulls_first(&self, asc: bool) -> bool
pub fn nulls_first(&self, asc: bool) -> bool
Evaluates the null ordering based on the given ascending flag.
§Returns
true
if nulls should appear first.false
if nulls should appear last.
Trait Implementations§
Source§impl Clone for NullOrdering
impl Clone for NullOrdering
Source§fn clone(&self) -> NullOrdering
fn clone(&self) -> NullOrdering
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 NullOrdering
impl Debug for NullOrdering
Source§impl From<&str> for NullOrdering
impl From<&str> for NullOrdering
Source§impl FromStr for NullOrdering
impl FromStr for NullOrdering
impl Copy for NullOrdering
Auto Trait Implementations§
impl Freeze for NullOrdering
impl RefUnwindSafe for NullOrdering
impl Send for NullOrdering
impl Sync for NullOrdering
impl Unpin for NullOrdering
impl UnwindSafe for NullOrdering
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more