typenum::marker_traits

Trait Bit

source
pub trait Bit:
    Sealed
    + Copy
    + Default
    + 'static {
    const U8: u8;
    const BOOL: bool;

    // Required methods
    fn new() -> Self;
    fn to_u8() -> u8;
    fn to_bool() -> bool;
}
Expand description

The marker trait for compile time bits.

Required Associated Constants§

source

const U8: u8

source

const BOOL: bool

Required Methods§

source

fn new() -> Self

Instantiates a singleton representing this bit.

source

fn to_u8() -> u8

source

fn to_bool() -> bool

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Bit for B0

source§

const U8: u8 = 0u8

source§

const BOOL: bool = false

source§

impl Bit for B1

source§

const U8: u8 = 1u8

source§

const BOOL: bool = true