pub trait UInt:
AsPrimitive<u8>
+ PrimInt
+ Unsigned
+ AddAssign
+ DivAssign
+ Shl<u8, Output = Self>
+ ShlAssign<u8>
+ Shr<u8, Output = Self>
+ ShrAssign<u8>
+ SubAssign<Self>
+ Display {
const _0: Self;
const _1: Self;
const MAX_VALUE: Self;
const BIT_COUNT: u8 = _;
// Required method
fn from_u8(v: u8) -> Self;
}
Expand description
§Examples
use int::UInt;
assert_eq!(u8::BIT_COUNT, 8);
assert_eq!(u16::BIT_COUNT, 16);
assert_eq!(u32::BIT_COUNT, 32);
assert_eq!(u64::BIT_COUNT, 64);
assert_eq!(u128::BIT_COUNT, 128);
Required Associated Constants§
Provided 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.