Skip to main content

sum_inst_variants

Function sum_inst_variants 

Source
pub fn sum_inst_variants(
    name: &str,
    args: &[TypeRef],
    types: &HashMap<String, Arc<TypeDecl>>,
) -> Option<Vec<(String, Vec<(String, TypeRef)>)>>
Expand description

#593: the concrete (variant-name, [(field-name, field-type)]) list for a generic sum instantiation Name[args…] — the declared variants with every type parameter substituted by the matching argument. The sum analogue of record_inst_fields; None (defensively) if name is not a declared generic sum or the arity does not match.