pub trait Bits: Unsigned {
type Store: BitOps + Default + Copy + PartialEq + Debug;
}
Expand description
A type level number signifying the number of bits in a bitmap.
This trait is implemented for type level numbers from U1
to U1024
.
§Examples
assert_eq!(
std::mem::size_of::<<U10 as Bits>::Store>(),
std::mem::size_of::<u16>()
);
Required Associated Types§
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.