Expand description
Type-Resolution + Recursion-Guards (XTypes §7.3.4.5, §7.3.4.9).
Cross-references between TypeObjects happen via EquivalenceHash
TypeIdentifiers (EK_MINIMAL / EK_COMPLETE). A TypeRegistry map caches
known objects; resolver functions follow alias chains and
detect recursion/cycles/DoS attempts via a depth cap.
Structs§
- Type
Registry - In-memory registry of known TypeObjects, indexed by
EquivalenceHash. Typically populated by TypeLookup replies.
Enums§
- Resolve
Error - Error during type resolution.
Constants§
- DEFAULT_
MAX_ RESOLVE_ DEPTH - Maximum depth for recursively resolving alias chains and TypeIdentifier references. Prevents DoS via malicious type graphs with cycles.
- DEFAULT_
MAX_ RESOLVE_ NODES - Maximum number of nodes during
collect_referenced_hashes. In addition to the depth cap this also bounds wide/fan-out-heavy graphs (a struct with 10,000 member entries that all reference hashes).
Functions§
- collect_
referenced_ hashes - Collects transitively all
EquivalenceHashTypeIdentifiers that are referenced byrootdirectly or indirectly (through collections, struct members, union cases, alias targets). Useful for TypeLookup dependency resolution (T14). - resolve_
alias_ chain - Follows alias chains: if
tireferences an alias (and the alias is known in the registry), resolve to the related_type. Primitive / plain / hash-direct are returned unchanged.