Trait ConstTrool

Source
pub trait ConstTrool {
    type Value: Sized;

    const VALUE: Self::Value;
}
Expand description

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

See also the [const_trool!] macro, and the True, False and Maybe 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 ConstTrool for [(); 0]

Source§

const VALUE: False = False

Source§

type Value = False

Source§

impl ConstTrool for [(); 1]

Source§

const VALUE: True = True

Source§

type Value = True

Source§

impl ConstTrool for [(); 2]

Source§

const VALUE: Maybe = Maybe

Source§

type Value = Maybe

Implementors§