Skip to main content

operator_method_answers_bool

Function operator_method_answers_bool 

Source
pub fn operator_method_answers_bool(name: &str) -> bool
Expand description

Whether an operator method has to hand back a bool.

==, < and <= answer a question about two values, and !=, > and >= are derived from them, so a program reading one of the six as a condition has to get a bool whatever the operands are.