pub trait Integer:
Clone
+ Debug
+ PartialEq
+ PartialOrd
+ Zero
+ One
+ Product
+ Add<Output = Self>
+ Sub<Output = Self>
+ Mul<Output = Self>where
for<'a> &'a Self: IntegerRef<Self>,{
// Required method
fn from_usize(i: usize) -> Self;
}Expand description
Trait representing integer arithmetic.
This is a lighter version of the Integer trait provided by the
num crate, here we only consider the
arithmetic operations needed for STV.
Required Methods§
Sourcefn from_usize(i: usize) -> Self
fn from_usize(i: usize) -> Self
Obtains an integer from a primitive usize integer.
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.