pub trait Numeric:
Primitive
+ Sized
+ Copy
+ Default
+ Debug
+ PartialOrd
+ Shl<u32, Output = Self>
+ ShlAssign<u32>
+ Shr<u32, Output = Self>
+ ShrAssign<u32>
+ Rem<Self, Output = Self>
+ RemAssign<Self>
+ BitAnd<Self, Output = Self>
+ BitOr<Self, Output = Self>
+ BitOrAssign<Self>
+ BitXor<Self, Output = Self>
+ Not<Output = Self>
+ Sub<Self, Output = Self> {
const BITS_SIZE: u32;
const ZERO: Self;
const ONE: Self;
// Required methods
fn from_u8(u: u8) -> Self;
fn to_u8(self) -> u8;
}
Expand description
This trait extends many common integer types (both unsigned and signed) with a few trivial methods so that they can be used with the bitstream handling traits.
Required Associated Constants§
Required Methods§
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.