Trait Boolean

Source
pub trait Boolean:
    Sealed
    + MarkerType
    + ConstDefault
    + Default
    + Sized
    + Debug
    + Copy
    + Clone
    + Not
    + BitAnd<True, Output = Self>
    + BitAnd<False, Output = False>
    + BitAnd<Self, Output = Self>
    + BitOr<True, Output = True>
    + BitOr<False, Output = Self>
    + BitOr<Self, Output = Self>
    + BitXor<True, Output = <Self as Not>::Output>
    + BitXor<False, Output = Self>
    + BitXor<Self, Output = False> {
    const VALUE: bool;
}
Expand description

Represents a type-level bool

Only implemented on True and False.

For examples look at the module-level documentation.

This trait is sealed and cannot be implemented for types outside this crate.

Required Associated Constants§

Source

const VALUE: bool

The bool value of this type

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.

Implementors§

Source§

impl Boolean for False

Source§

const VALUE: bool = false

Source§

impl Boolean for True

Source§

const VALUE: bool = true