Trait lowdim::Integer[][src]

pub trait Integer where
    Self: Copy,
    Self: Display,
    Self: TryFrom<usize>,
    Self: Ord,
    Self: IntegerOps
{ fn zero() -> Self;
fn one() -> Self;
fn two() -> Self;
fn abs(self) -> Self;
fn signum(self) -> Self; fn to_usize(self) -> usize
    where
        usize: TryFrom<Self>,
        <usize as TryFrom<Self>>::Error: Debug
, { ... }
fn from_usize(n: usize) -> Self
    where
        <Self as TryFrom<usize>>::Error: Debug
, { ... } }
Expand description

Required traits and operations for integers.

Required methods

Returns zero.

Returns one.

Returns two.

The absolute value function.

The sign function.

Returns 1 for positive numbers, 0 for zero and -1 for negative numbers.

Provided methods

Converts to an usize if possible, or panics otherwise.

Converts from an usize if possible, or panics otherwise.

Implementations on Foreign Types

Implementors