devela::num::logic

Trait ConstBool

Source
pub trait ConstBool {
    type Value: Sized;

    const VALUE: Self::Value;
}
Expand description

Allows to convert compile-time constants into type-level booleans.

See also the const_bool macro, and the True and False types.

Required Associated Constants§

Source

const VALUE: Self::Value

The constant value of the type-level boolean.

Required Associated Types§

Source

type Value: Sized

The resulting type-level boolean (True or False).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ConstBool for [(); 0]

Source§

const VALUE: False = False

Source§

type Value = False

Source§

impl ConstBool for [(); 1]

Source§

const VALUE: True = True

Source§

type Value = True

Implementors§