fn derive_variant_arm(
variant: &VariantInfo<'_>,
derive_fields: bool,
where_clause: &mut Option<WhereClause>,
) -> TokenStreamExpand description
Generate the match arm expression for a struct or enum variant in a derived
ToTyped implementation.
- Unit variants are reified into
TypedValue::Keyword, using the variant’s identifier converted withcg::to_css_identifier. - Variants marked with
#[css(skip)]or#[typed_value(skip)]or#[typed(todo)]returnNone. - Variants with fields delegate to
derive_variant_fields_expr()whenderive_fieldsis enabled; otherwise they returnNone.
Note: #[css(keyword = "...")] overrides are not handled in this
derive_variant_arm path. This is fine for now because all existing cases
that use such overrides (e.g. #[css(keyword = "preserve-3d")]) occur in
pure keyword enums, which are covered by the all-unit ToCss path. Support
will need to be added here once mixed enums with keyword overrides start
implementing ToTyped.