pub trait Integer:
Add
+ Sub
+ Mul
+ Div
+ Shl
+ Shr
+ BitAnd
+ BitOr
+ BitXor
+ PartialEq
+ Eq
+ PartialOrd
+ Ord
+ Clone
+ Copy
+ Default
+ Debug
+ Display {
const BITS: usize;
const MASK: Self;
// Required methods
fn from_usize(value: usize) -> Self;
fn to_usize(self) -> usize;
}Expand description
An integer.
Required Associated Constants§
Required Methods§
Sourcefn from_usize(value: usize) -> Self
fn from_usize(value: usize) -> Self
Converts a usize to an integer.
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.