Skip to main content

parse_default_attr

Function parse_default_attr 

Source
pub(crate) fn parse_default_attr(attr: &Attribute) -> Option<(String, Span)>
Expand description

Extracts the default value from a #[miniextendr(default = "...")] attribute.

Returns Some((default_value, attr_span)) if the attribute contains a default option. The span is used for error reporting when the default references a non-existent parameter.