Skip to main content

wrap_leaf_type

Function wrap_leaf_type 

Source
pub fn wrap_leaf_type(ty: &Type, skip_over: &HashSet<&str>) -> Type
Expand description

Wrap leaf types in adze::WithLeaf unless they are in the skip set.

§Arguments

  • ty - The type to potentially wrap
  • skip_over - Set of container types to skip wrapping (e.g., “Vec”, “Option”)

§Returns

The type with leaf types wrapped in adze::WithLeaf, or the original type if it’s a container type in the skip set. For skipped containers, recursively wraps their inner generic arguments.