pub trait BoolExt {
// Required methods
fn implies(self, other: Self) -> Self;
fn implied_by(self, other: Self) -> Self;
}Required Methods§
Sourcefn implies(self, other: Self) -> Self
fn implies(self, other: Self) -> Self
Logical implication, equivalent to !self || other.
assert!(false.implies(false));
assert!(false.implies(true));
assert!(!true.implies(false));
assert!(true.implies(true));Sourcefn implied_by(self, other: Self) -> Self
fn implied_by(self, other: Self) -> Self
Inverse of .implies().
assert!(false.implied_by(false));
assert!(!false.implied_by(true));
assert!(true.implied_by(false));
assert!(true.implied_by(true));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.