Skip to main content Module enum_variant_parser Copy item path Source ParsedEnumVariant EnumVariantKind VariantFieldType collect_references Collect all EnumRef names from a parsed variant. parse_enum_variant Parse a single enum variant string like "Active", "Text(String)",
or "Image { name: String, width: i64 }". type_needs_chrono Check if a variant type tree contains DateTime anywhere. type_needs_entity_id Check if a variant type tree contains EntityId anywhere. type_needs_float Check if a variant type tree contains a float type (f32/f64) anywhere. type_needs_uuid Check if a variant type tree contains Uuid anywhere. type_to_mobile_rust Convert a VariantFieldType to its mobile Rust type string.
EntityId → u64, Uuid → String, DateTime → MobileDateTime, EnumRef → Mobile{Name}. type_to_rust Convert a VariantFieldType to its Rust type string.
Scalars and enum refs pass through; shorthands expand to qualified paths. variant_core_to_mobile_construct Generate the forwarding construction for core-to-mobile From impl. variant_match_pattern Generate the destructuring match pattern for a variant.
E.g. "Active", "Text(v0)", "Image { name, width }". variant_mobile_to_core_construct Generate the forwarding construction for mobile-to-core From impl.
Handles type conversions for Uuid (String → uuid::Uuid) and DateTime (MobileDateTime → chrono). variant_needs_chrono variant_needs_entity_id variant_needs_float variant_needs_uuid Check if a whole variant needs uuid/chrono/entity_id imports. variant_to_mobile_line Convert an entire variant to its mobile definition line. variant_to_rust_line Convert an entire variant to its Rust definition line.
E.g. "Text(String)", "Image { name: String, width: i64 }", "Active".