Skip to main content

can_generate_enum_conversion

Function can_generate_enum_conversion 

Source
pub fn can_generate_enum_conversion(enum_def: &EnumDef) -> bool
Expand description

Check if an enum can have From/Into safely generated (both directions). Supports unit-variant enums and enums whose data variants contain only simple convertible field types (primitives, String, Bytes, Path, Unit).