[][src]Trait abi_stable::type_level_bool::Boolean

pub trait Boolean: MarkerType + Sealed + Copy + Not + BitAnd<True> + BitAnd<False> + BitOr<True> + BitOr<False> + BitXor<True> + BitXor<False> + Clone + Default + Debug where
    <Self::Not as Boolean>::Not == Self, 
{ type Not: Boolean; const VALUE: bool; default fn if_true<U, F>(F) -> Option<U>
    where
        F: FnOnce() -> U
, { ... }
default fn if_false<U, F>(F) -> Option<U>
    where
        F: FnOnce() -> 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

type Not: Boolean

The negation of this type.

Loading content...

Associated Constants

const VALUE: bool

The bool value of this type

Loading content...

Provided methods

default fn if_true<U, F>(F) -> Option<U> where
    F: FnOnce() -> U, 

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

default fn if_false<U, F>(F) -> Option<U> where
    F: FnOnce() -> U, 

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

Loading content...

Implementors

impl Boolean for False[src]

type Not = True

default fn if_true<U, F>(F) -> Option<U> where
    F: FnOnce() -> U, 
[src]

impl Boolean for True[src]

type Not = False

default fn if_false<U, F>(F) -> Option<U> where
    F: FnOnce() -> U, 
[src]

Loading content...