pub trait PartialOrdSpecImpl<Rhs: ?Sized = Self>: PartialEq<Rhs> + PartialOrd<Rhs> {
// Required methods
exec fn obeys_partial_cmp_spec() -> bool;
exec fn partial_cmp_spec(&self, other: &Rhs) -> Option<Ordering>;
}
Required Methods§
Sourceexec fn obeys_partial_cmp_spec() -> bool
exec fn obeys_partial_cmp_spec() -> bool
Sourceexec fn partial_cmp_spec(&self, other: &Rhs) -> Option<Ordering>
exec fn partial_cmp_spec(&self, other: &Rhs) -> Option<Ordering>
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.
Implementations on Foreign Types§
Source§impl PartialOrdSpecImpl for i8
impl PartialOrdSpecImpl for i8
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl PartialOrdSpecImpl for i16
impl PartialOrdSpecImpl for i16
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl PartialOrdSpecImpl for i32
impl PartialOrdSpecImpl for i32
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl PartialOrdSpecImpl for i64
impl PartialOrdSpecImpl for i64
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl PartialOrdSpecImpl for i128
impl PartialOrdSpecImpl for i128
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl PartialOrdSpecImpl for isize
impl PartialOrdSpecImpl for isize
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl PartialOrdSpecImpl for u8
impl PartialOrdSpecImpl for u8
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl PartialOrdSpecImpl for u16
impl PartialOrdSpecImpl for u16
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl PartialOrdSpecImpl for u32
impl PartialOrdSpecImpl for u32
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl PartialOrdSpecImpl for u64
impl PartialOrdSpecImpl for u64
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl PartialOrdSpecImpl for u128
impl PartialOrdSpecImpl for u128
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl PartialOrdSpecImpl for usize
impl PartialOrdSpecImpl for usize
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }
Source§impl<T: PartialOrdSpec> PartialOrdSpecImpl for Option<T>
impl<T: PartialOrdSpec> PartialOrdSpecImpl for Option<T>
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ T::obeys_partial_cmp_spec() }
Source§open spec fn partial_cmp_spec(&self, other: &Option<T>) -> Option<Ordering>
open spec fn partial_cmp_spec(&self, other: &Option<T>) -> Option<Ordering>
{
match (self, other) {
(None, None) => Some(core::cmp::Ordering::Equal),
(None, Some(_)) => Some(core::cmp::Ordering::Less),
(Some(_), None) => Some(core::cmp::Ordering::Greater),
(Some(x), Some(y)) => x.partial_cmp_spec(y),
}
}