Skip to content

Commit f786458

Browse files
committed
Rework RecGroupBuilder API per review feedback
Replace the public surface with a fluent nested-builder API: - Use a single kind-agnostic `PendingType` handle instead of separate `PendingStructId`/`PendingArrayId`/`PendingFuncId`. - Drop the public `*Template` value types. Concrete fields/params take the existing `FieldType`/`ValType` directly; forward references to in-group siblings use `forward_ref_field`/`forward_ref_element`/`forward_ref_param`/ `forward_ref_result`, which return small builders configured with `mutability`/`nullable` and committed with `finish` (a builder so that future ref attributes such as `shared` can be added without breaking the signature). - Finality and supertypes are set via builder methods: `finality(Finality)`, `supertype(<concrete>)` for already-registered supertypes, and `forward_supertype(PendingType)` for in-group siblings. `build()` performs the same structural/finality validation the one-off constructors do, after registration so that forward supertypes resolve. Getters are `get_struct`/`get_array`/`get_func -> Option<..>`.
1 parent ff45908 commit f786458

2 files changed

Lines changed: 1024 additions & 965 deletions

File tree

0 commit comments

Comments
 (0)