Integer

Trait Integer 

Source
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§

Source

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.

Implementations on Foreign Types§

Source§

impl Integer for f64

Source§

fn from_usize(i: usize) -> Self

Source§

impl Integer for BigInt

Source§

fn from_usize(i: usize) -> Self

Implementors§