Skip to main content

BitSize

Trait BitSize 

Source
pub trait BitSize {
    const N_BITS: u16;
    const N_BYTES: u8 = _;
    const N_WORDS: u16 = _;
}

Required Associated Constants§

Source

const N_BITS: u16

Number of bits occupied by the value.

Provided Associated Constants§

Source

const N_BYTES: u8 = _

Number of whole bytes occupied by the value.

Source

const N_WORDS: u16 = _

Number of whole words occupied by the value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl BitSize for f32

Source§

const N_BITS: u16 = 32

Source§

impl BitSize for f64

Source§

const N_BITS: u16 = 64

Source§

impl BitSize for i8

Source§

const N_BITS: u16 = 8

Source§

impl BitSize for i16

Source§

const N_BITS: u16 = 16

Source§

impl BitSize for i32

Source§

const N_BITS: u16 = 32

Source§

impl BitSize for i64

Source§

const N_BITS: u16 = 64

Source§

impl BitSize for i128

Source§

const N_BITS: u16 = 128

Source§

impl BitSize for u8

Source§

const N_BITS: u16 = 8

Source§

impl BitSize for u16

Source§

const N_BITS: u16 = 16

Source§

impl BitSize for u32

Source§

const N_BITS: u16 = 32

Source§

impl BitSize for u64

Source§

const N_BITS: u16 = 64

Source§

impl BitSize for u128

Source§

const N_BITS: u16 = 128

Source§

impl<T: BitSize, const N: usize> BitSize for &[T; N]

Source§

impl<T: BitSize, const N: usize> BitSize for [T; N]

Source§

const N_BITS: u16 = <&[T; N]>::N_BITS

Implementors§

Source§

impl BitSize for DecawattHours<u16>

Source§

const N_BITS: u16 = <u16 as BitSize>::N_BITS

Source§

const N_BYTES: u8 = <u16 as BitSize>::N_BYTES

Source§

const N_WORDS: u16 = <u16 as BitSize>::N_WORDS

Source§

impl BitSize for DecawattHours<u32>

Source§

const N_BITS: u16 = <u32 as BitSize>::N_BITS

Source§

const N_BYTES: u8 = <u32 as BitSize>::N_BYTES

Source§

const N_WORDS: u16 = <u32 as BitSize>::N_WORDS

Source§

impl BitSize for NaiveTime

Source§

impl BitSize for Percentage<u16>

Source§

const N_BITS: u16 = <u16 as BitSize>::N_BITS

Source§

const N_BYTES: u8 = <u16 as BitSize>::N_BYTES

Source§

const N_WORDS: u16 = <u16 as BitSize>::N_WORDS

Source§

impl BitSize for Slot

Source§

impl BitSize for StateOfChargeRange

Source§

impl BitSize for StateOfChargeSettings

Source§

impl BitSize for Watts<i32>

Source§

const N_BITS: u16 = <i32 as BitSize>::N_BITS

Source§

const N_BYTES: u8 = <i32 as BitSize>::N_BYTES

Source§

const N_WORDS: u16 = <i32 as BitSize>::N_WORDS

Source§

impl BitSize for Watts<u16>

Source§

const N_BITS: u16 = <u16 as BitSize>::N_BITS

Source§

const N_BYTES: u8 = <u16 as BitSize>::N_BYTES

Source§

const N_WORDS: u16 = <u16 as BitSize>::N_WORDS

Source§

impl BitSize for WorkingMode

Source§

const N_BITS: u16 = u16::N_BITS

Source§

const N_BYTES: u8 = u16::N_BYTES

Source§

const N_WORDS: u16 = u16::N_WORDS