pub trait TryPartialOrd<Rhs: ?Sized = Self>: TryPartialEq<Rhs> {
// Required method
fn try_partial_cmp(
&self,
other: &Rhs,
) -> Result<Option<Ordering>, Self::Error>;
// Provided methods
fn try_lt(&self, other: &Rhs) -> Result<bool, Self::Error> { ... }
fn try_le(&self, other: &Rhs) -> Result<bool, Self::Error> { ... }
fn try_gt(&self, other: &Rhs) -> Result<bool, Self::Error> { ... }
fn try_ge(&self, other: &Rhs) -> Result<bool, Self::Error> { ... }
}
Expand description
The try trait for PartialOrd
.
Required Methods§
Sourcefn try_partial_cmp(&self, other: &Rhs) -> Result<Option<Ordering>, Self::Error>
fn try_partial_cmp(&self, other: &Rhs) -> Result<Option<Ordering>, Self::Error>
The fallible equivalent of PartialOrd::partial_cmp
.
Provided Methods§
Sourcefn try_lt(&self, other: &Rhs) -> Result<bool, Self::Error>
fn try_lt(&self, other: &Rhs) -> Result<bool, Self::Error>
The fallible equivalent of PartialOrd::lt
.
Sourcefn try_le(&self, other: &Rhs) -> Result<bool, Self::Error>
fn try_le(&self, other: &Rhs) -> Result<bool, Self::Error>
The fallible equivalent of PartialOrd::le
.