fn is_constant_getter(header: &FunctionHeader<'_>) -> bool
Expand description
Checks if a function getter is a valid constant getter with a heuristic:
- name is
SCREAMING_SNAKE_CASE
- external view visibility and mutability.
- zero parameters.
- exactly one return value.
- return value is an elementary type