Trait quark::BitSize

source ·
pub trait BitSize {
    const BIT_SIZE: usize;
}
Expand description

Provides the bit size of the type as a constant.

This trait defines a constant for the number of bits in the type. This constant can be useful for implementing other traits on various sized types.

Examples

use quark::BitSize;

assert_eq!(u8::BIT_SIZE, 8);
assert_eq!(u128::BIT_SIZE, 128);

Required Associated Constants

The size of the type in bits.

Implementations on Foreign Types

Implementors