Skip to main content

BoolExt

Trait BoolExt 

Source
pub trait BoolExt {
    // Required methods
    fn ternary<U>(&self, _: U, _: U) -> U;
    fn and_then<U>(&self, _: impl FnOnce() -> Option<U>) -> Option<U>;
    fn neg(&self) -> Self;
    fn or_exit(&self);
}

Required Methods§

Source

fn ternary<U>(&self, _: U, _: U) -> U

Source

fn and_then<U>(&self, _: impl FnOnce() -> Option<U>) -> Option<U>

Source

fn neg(&self) -> Self

Source

fn or_exit(&self)

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 BoolExt for bool

Source§

fn ternary<U>(&self, and: U, or: U) -> U

Source§

fn and_then<U>(&self, f: impl FnOnce() -> Option<U>) -> Option<U>

Source§

fn neg(&self) -> Self

Source§

fn or_exit(&self)

Implementors§