Trait PowerOfTwo
pub trait PowerOfTwo: Sealed
The marker trait for type-level numbers which are a power of two.
Examples
Here's a working example:
use ;
;
;
Numbers which are not a power of two will fail to compile in this example:
use ;
;
;
;
Implementors
impl PowerOfTwo for B1impl PowerOfTwo for UInt<UTerm, B1>impl<U: Unsigned + NonZero + PowerOfTwo> PowerOfTwo for PInt<U>impl<U: Unsigned + PowerOfTwo> PowerOfTwo for UInt<U, B0>