Skip to main content

Guard

Type Alias Guard 

Source
pub type Guard = fn(&[Option<i128>]) -> bool;
Expand description

A condition on the constants a pattern matched.

It is handed one entry per binding, holding the value of that binding when it has one. A guard about a binding that is not a constant is false, which is how a rule about a number declines an operand that is a register.