glue
Types
Functions
pub fn generate_compare(
src: String,
type_name: String,
) -> Result(String, Error)
Generate a function that lists all the variants of a given custom type.
Errors if:
- The source is invalid.
- If type cannot be found.
- If the type has variants that are records and as such cannot be listed without being given arguments.
pub fn generate_list_variants(
src: String,
type_name: String,
) -> Result(String, Error)
Generate a function that lists all the variants of a given custom type.
Errors if:
- The source is invalid.
- If type cannot be found.
- If the type has variants that are records and as such cannot be listed without being given arguments.