{"ast_node_type":"function","tokens":[{"end":66,"kind":"keyword","start":0,"text":"pub"}]}
    pub fn variant(&self, idx: VariantIdx) -> Option<VariantDef> {
        (idx.to_index() < self.num_variants()).then_some(VariantDef { idx, adt_def: *self })