pub trait TrySuccessor: PartialOrd + Sized {
// Required method
fn try_successor(&self) -> Option<Self>;
}Expand description
A partial order in which some elements have successors, i.e., unique least greater values.
Every order can implement this trait, mathematically speaking it is quite boring. The actual computation of successors (when they exist) is the interesting part.
Required Methods§
Sourcefn try_successor(&self) -> Option<Self>
fn try_successor(&self) -> Option<Self>
If self has a successor, i.e., a unique least value which is strictly greater than self, returns it. If there is no unique successor, returns None.
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.