Description
@MomoLangenstein suggested that it might be a good idea to enforce strong typing on integer IDs in the Rust API, so that you don't, for example accidentally pass an individual ID to a function that expects a node ID. There was some discussion in the Slack channel about this: apparently some similar type constraints were previously implemented in the tskit
C API but then removed because it required typing too much boilerplate, for not much discernible benefit. But @molpopgen has just said:
Interestingly (because you can't do this in C), you seem to be able to do this in rust in a way that may not break API and would still allow the plain tsk_id_t to be passed to functions.
Perhaps @MomoLangenstein could weigh in here with what they were thinking about?
ID types needed for this to be closed:
- Node, done via Add strong ID type infrastructure + NodeID #129
- Individual, done via add IndividualId #133
- Population, done via add population id #135
- Edge, via add EdgeId #138
- Site, via add mutation and site id #136
- Mutation, via add mutation and site id #136
- Provenance, via add migration provenance ids #137
- Migration, via add migration provenance ids #137