is_[condition]: Boolean Check
Check a condition about a datatype.
#![allow(unused)] fn main() { impl <T> Vec<T> { is_empty(&self) -> bool; } impl f32 { is_nan(self) -> bool; } impl u32 { is_power_of_two(self) -> bool; } }
- A boolean condition on a value.
-
isprefix is preferred over methods withnotin the name.There are no instances of
is_not_in standard library methods, just use!value.is_[condition].