Enum nbits_vec::consts::N12B16
[−]
[src]
pub enum N12B16 {}
Trait Implementations
impl Value for N12B16
[src]
type Block = u16
The storage type of Value
s. Read more
fn nbits() -> usize
The value bit width.
fn one() -> Self::Block
Return 1
fn zero() -> Self::Block
Return 0
fn mask() -> Self::Block
The value's bit mask in the Block
. Read more
fn block_bits() -> usize
Bit-size of Block
.
fn is_aligned() -> bool
Value is aligned
when block_bits
is divisible by nbits
.
fn is_packed() -> bool
Value is packed
when block_bits
is equal to nbits
.
impl ValueExt for N12B16
[src]
fn raw_cap_from(cap: usize) -> usize
Converts capacity to storage size
fn cap_from(raw_cap: usize) -> usize
Converts the storage size to capacity.
fn loc(index: usize) -> (usize, usize)
Converts the vector index to buf (index, offset)
tuple.
fn bit_loc(bit: usize) -> (usize, usize)
Converts bit index to buf BitLoc
.
fn bit_offset(bit: usize) -> usize
Returns block offset of bit position bit
.
fn bit_index(bit: usize) -> usize
Returns block index of bit position bit
.