Bool

Trait Bool 

Source
pub trait Bool {
    type Not: Bool;
    type Implies<B: Bool>: Bool;

    const VALUE: bool;
}
Expand description

A Boolean value, encoded as a type.

Required Associated Constants§

Source

const VALUE: bool

The Boolean value as a bool.

Required Associated Types§

Source

type Not: Bool

The negation of the Boolean value.

The type alias Not<B> is a nicer way to access this.

Source

type Implies<B: Bool>: Bool

The value of Self -> B.

The type alias Implies<A, B> is a nicer way to access this.

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 Bool for False

Source§

const VALUE: bool = false

Source§

type Not = True

Source§

type Implies<B: Bool> = True

Source§

impl Bool for True

Source§

const VALUE: bool = true

Source§

type Not = False

Source§

type Implies<B: Bool> = B