pub trait Integer:
Sized
+ Copy
+ Debug
+ Ord
+ BitOr<Output = Self> {
type Bytes: Copy + Default + AsMut<[u8]> + AsRef<[u8]>;
const ZERO: Self;
const ONE: Self;
const TWO: Self;
// Required methods
fn from_bytes(bytes: Self::Bytes) -> Self;
fn is_even(self) -> bool;
fn add(self, rhs: Self) -> Self;
fn sub(self, rhs: Self) -> Self;
fn mul(self, rhs: Self) -> Self;
fn div(self, rhs: Self) -> Self;
fn neg(self) -> Self;
}Required Associated Constants§
Required Associated Types§
Required Methods§
fn from_bytes(bytes: Self::Bytes) -> Self
fn is_even(self) -> bool
fn add(self, rhs: Self) -> Self
fn sub(self, rhs: Self) -> Self
fn mul(self, rhs: Self) -> Self
fn div(self, rhs: Self) -> Self
fn neg(self) -> Self
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.