pub trait Bool {
// Required method
fn to_bool() -> bool;
}Expand description
Marker trait for type-level booleans.
§Examples
use reflect_nat::{True, False, Bool};
fn require_bool<B: Bool>() -> bool { B::to_bool() }
assert!(require_bool::<True>());
assert!(!require_bool::<False>());Required Methods§
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.