Skip to main content

IconResolverCallbackType

Type Alias IconResolverCallbackType 

Source
pub type IconResolverCallbackType = extern "C" fn(OptionRefAny, &StyledDom, &SystemStyle) -> StyledDom;
Expand description

Callback type for resolving icon data to a StyledDom.

Parameters:

  • icon_data: The RefAny data from the icon pack (cloned, or None if not found)
  • original_icon_dom: The original icon node’s StyledDom (contains inline styles, a11y info, icon_name)
  • system_style: Current system style (theme, colors, etc.)

Returns: A StyledDom that will replace the icon node. The resolver should copy relevant styles from original_icon_dom to the result. Return an empty StyledDom to show a placeholder or nothing.

Note: icon_name is accessible via original_icon_dom.node_data[0].get_node_type()NodeType::Icon(name)