pub trait IsTruthy {
// Required method
fn truthy(&self) -> bool;
}Expand description
is_true(x) — polymorphic truthy check. The transpiler emits
is_true(&X) where X may be a Value, a bool, or the result of
any other predicate (is_equal, in_op, …). This trait lets all of
them work without manual conversion at the call site.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".