pub trait PartialOrder {
// Required method
fn part_cmp(&self, other: &Self) -> PartialOrdCompResult;
// Provided methods
fn is_greater_or_equal(&self, other: &Self) -> bool { ... }
fn is_smaller_or_equal(&self, other: &Self) -> bool { ... }
}Expand description
Trait for types implementing a partial order
This trait allows you to specify a custom partial order that does not
conflict with the standard PartialOrd trait.
Required Methods§
fn part_cmp(&self, other: &Self) -> PartialOrdCompResult
Provided Methods§
Sourcefn is_greater_or_equal(&self, other: &Self) -> bool
fn is_greater_or_equal(&self, other: &Self) -> bool
Check whether self is greater or equal to other in the partial order
Sourcefn is_smaller_or_equal(&self, other: &Self) -> bool
fn is_smaller_or_equal(&self, other: &Self) -> bool
Check whether self is smaller or equal to other in the partial order
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.