Skip to main content

computed_params_type_name

Function computed_params_type_name 

pub fn computed_params_type_name(field: &Field) -> Option<&str>
Expand description

The params type name off a field’s @computed(params: <Type>?) attribute, or None for a bare @computed field (or a field with no @computed attribute at all). Assumes the attribute is already well-formed — per-declaration validation (e.g. cratestack-parser’s validate_computed_field_attribute) must run first and reject anything else. Callers that still need to validate the argument form should parse the raw attribute text with parse_computed_params_arg instead.