pub trait BoolUtils {
// Required methods
fn not(&self) -> bool;
fn then_val<T>(&self, val: T) -> Option<T>;
fn if_true<T, F: FnOnce() -> T>(&self, f: F) -> Option<T>;
fn if_false<T, F: FnOnce() -> T>(&self, f: F) -> Option<T>;
fn toggle(&mut self);
}Required Methods§
fn not(&self) -> bool
fn then_val<T>(&self, val: T) -> Option<T>
fn if_true<T, F: FnOnce() -> T>(&self, f: F) -> Option<T>
fn if_false<T, F: FnOnce() -> T>(&self, f: F) -> Option<T>
fn toggle(&mut 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.