Trait std::num::Integer

pub trait Integer: Num + Orderable + Div<Self, Self> + Rem<Self, Self> {
    fn div_rem(&self, other: &Self) -> (Self, Self);
    fn div_floor(&self, other: &Self) -> Self;
    fn mod_floor(&self, other: &Self) -> Self;
    fn div_mod_floor(&self, other: &Self) -> (Self, Self);
    fn gcd(&self, other: &Self) -> Self;
    fn lcm(&self, other: &Self) -> Self;
    fn is_multiple_of(&self, other: &Self) -> bool;
    fn is_even(&self) -> bool;
    fn is_odd(&self) -> bool;
}

Required Methods

fn div_rem(&self, other: &Self) -> (Self, Self)

fn div_floor(&self, other: &Self) -> Self

fn mod_floor(&self, other: &Self) -> Self

fn div_mod_floor(&self, other: &Self) -> (Self, Self)

fn gcd(&self, other: &Self) -> Self

fn lcm(&self, other: &Self) -> Self

fn is_multiple_of(&self, other: &Self) -> bool

fn is_even(&self) -> bool

fn is_odd(&self) -> bool

Implementors