Mike Gerwitz
2ae33a1dfa
The graph's ontology is defined in the direction of the edge: from OA to OB. This is enforced by the type system to ensure that no code path is able to generate an invalid graph. But that also makes it very difficult to work with a generic source to a specific target. This introduces a `ObjectIndexRelTo` trait that says whether `Self` is able to be related to some `ObjectKind` `OB`, implements it for `ObjectIndex where ObjectRelTo<OB>`, and introduces a new semi-opaque type `ObjectIndexTo` that allows for the source `ObjectIndex` to be generic. This then redefines some existing graph primitives in terms of `ObjectIndexRelTo`, in particular creating edges, so that `ObjectIndex` can be used as today, and the new `ObjectIndexTo` can be used in the same way with the same API, without violating the graph ontology. This will be used by `AirAggregate` to create dynamic targets for rooting and splicing/expansion. DEV-13708 |
||
---|---|---|
.. | ||
object | ||
visit | ||
object.rs | ||
test.rs | ||
visit.rs | ||
xmli.rs |