Type Alias ConstTypeBool

Source
pub type ConstTypeBool<const VAL: bool> = ConstTypeBool<VAL>;
Expand description

A convenience type alias that represents a constant boolean value.

Ideally, this should be a partial parametrization of struct ConstType<T, const VAL: T> with T = bool.

However, defining such a struct is impossible in Rust at the time of writing this code.

Aliased Type§

struct ConstTypeBool<const VAL: bool>;

Trait Implementations§

Source§

impl<const VAL: bool> Const<bool> for ConstTypeBool<VAL>

Source§

const VALUE: bool = VAL

The constant value of type T.
Source§

impl<const VAL: bool> OptionallyConst<bool> for ConstTypeBool<VAL>

Source§

const MAYBE_CONST: Option<bool>

An optional constant value of type T. Read more
Source§

fn into_value(self) -> bool

Converts the instance of the type into a value of type T.