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; }
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
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).