Trait mmtk::util::metadata::Bits

source ·
pub trait Bits {
    const BITS: u32;
    const LOG2: u32;
}
Expand description

Describes bits and log2 bits for the numbers. If num_traits has this, we do not need our own implementation: https://github.com/rust-num/num-traits/issues/247

Required Associated Constants§

source

const BITS: u32

The size of this atomic type in bits.

source

const LOG2: u32

The size (in log2) of this atomic type in bits.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Bits for u8

source§

const BITS: u32 = 8u32

source§

const LOG2: u32 = 3u32

source§

impl Bits for u16

source§

const BITS: u32 = 16u32

source§

const LOG2: u32 = 4u32

source§

impl Bits for u32

source§

const BITS: u32 = 32u32

source§

const LOG2: u32 = 5u32

source§

impl Bits for u64

source§

const BITS: u32 = 64u32

source§

const LOG2: u32 = 6u32

source§

impl Bits for usize

source§

const BITS: u32 = 64u32

source§

const LOG2: u32 = 6u32

Implementors§