Trait core_extensions::type_level_bool::Boolean[][src]

pub trait Boolean: Sealed + MarkerType + Default + Sized + Debug + Copy + Clone + BitAnd<True> + BitAnd<False> + BitOr<True> + BitOr<False> + BitXor<True> + BitXor<False> + Not {
    type Not: Boolean<Not = Self>;

    const VALUE: bool;
    fn if_true<U, F: FnOnce() -> U>(_: F) -> Option<U> { ... }
fn if_false<U, F: FnOnce() -> U>(_: F) -> Option<U> { ... } }

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.

Associated Types

The negation of this type.

Associated Constants

The bool value of this type

Provided Methods

If Self==True,runs the closure and returns Some , otherwise returns None.

If Self==False,runs the closure and returns Some , otherwise returns None.

Implementors