Trait turbo::Peano
[−]
pub trait Peano where Self: Sized { fn successor(&self) -> Result<Self, OverflowError>; fn predecessor(&self) -> Result<Self, OverflowError>; fn cmp(&self, other: &Self) -> Ordering; }
Peano arithmetic operators.
Required Methods
fn successor(&self) -> Result<Self, OverflowError>
Produces the next integer value in the field of self (i.e., increment).
fn predecessor(&self) -> Result<Self, OverflowError>
Produces the previous integer value in the field of self (i.e., decrement).
fn cmp(&self, other: &Self) -> Ordering
Total ordering function.