Trait mayda::utility::Bits
[−]
[src]
pub trait Bits { fn width() -> u32; fn bits(&self) -> u32; }
Indicates that the bitwise representation of the type is known to mayda
.
Intended to be implemented only for the primitive integer types. Mainly
used as a bound on the Encode
trait.
Required Methods
fn width() -> u32
Number of bits in the standard representation.
fn bits(&self) -> u32
Number of bits required to represent the number in binary. Notice that
0.bits() == 0u32
intentionally.