pub trait Int: Sized + Copy + Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> + Not<Output=Self> + BitAnd<Output=Self> + BitOr<Output=Self> + BitXor<Output=Self> + Shr<Self, Output=Self> + Shl<Self, Output=Self> + PartialEq + PartialOrd {
fn one() -> Self;
fn zero() -> Self;
fn byte_size() -> Self;
fn bit_size() -> Self;
fn count_ones(self) -> Self;
fn count_zeros(self) -> Self;
fn leading_zeros(self) -> Self;
fn trailing_zeros(self) -> Self;
fn wrapping_neg(self) -> Self;
fn wrapping_add(self, _: Self) -> Self;
fn wrapping_sub(self, _: Self) -> Self;
fn to_u32(self) -> u32;
fn to_u64(self) -> u64;
fn from_u16(_: u16) -> Self;
fn from_u32(_: u32) -> Self;
fn from_u64(_: u64) -> Self;
fn rotate_left(self, _: u32) -> Self;
fn rotate_right(self, _: u32) -> Self;
fn swap_bytes(self) -> Self;
fn from_be(self) -> Self;
fn from_le(self) -> Self;
fn to_be(self) -> Self;
fn to_le(self) -> Self;
fn pow(self, exp: u32) -> Self;
}
Required Methods
Implementors
impl Int for u8
impl Int for u16
impl Int for u32
impl Int for u64
impl Int for usize
impl Int for i8
impl Int for i16
impl Int for i32
impl Int for i64
impl Int for isize