Skip to main content

math_signature

Function math_signature 

Source
fn math_signature(name: &str) -> Option<MathSignature>
Expand description

The signature the PromQL name calls, or None when this compiler has no math kernel for it.

The map is explicit on purpose, as in range_function: a name that is not listed is refused rather than treated as math because it looks mathematical, so adding one more function is a decision made in one place. A name in this list is a promise that its kernel exists, which is why arity is a property of the variant rather than of the caller.