pub enum Ordering {
Less,
Equal,
Greater,
}Expand description
A Lean 4-style ordering value (mirrors Ordering in the kernel env).
Variants§
Implementations§
Source§impl Ordering
impl Ordering
Sourcepub fn then(self, other: Ordering) -> Self
pub fn then(self, other: Ordering) -> Self
Lexicographic combinator: if self == Equal, return other.
Sourcepub fn then_with<F: FnOnce() -> Ordering>(self, f: F) -> Self
pub fn then_with<F: FnOnce() -> Ordering>(self, f: F) -> Self
then with a lazily-evaluated second comparison.
Sourcepub fn from_signum(n: i32) -> Self
pub fn from_signum(n: i32) -> Self
Construct from a signum integer.
Negative → Less, zero → Equal, positive → Greater.
Trait Implementations§
impl Copy for Ordering
impl Eq for Ordering
impl StructuralPartialEq for Ordering
Auto Trait Implementations§
impl Freeze for Ordering
impl RefUnwindSafe for Ordering
impl Send for Ordering
impl Sync for Ordering
impl Unpin for Ordering
impl UnsafeUnpin for Ordering
impl UnwindSafe for Ordering
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