module Schematrix::Generators::Templates::Coercions

Computes and renders the from_h/to_h round-trip machinery of a generated class. Every conversion is a frozen literal mirroring the type algebra of its slot (scalar leaves, arrays, maps, tuples, unions, classes); the literals travel with the per-property delegations, and the interpreter and the class-slot dispatcher they run through live in the shared CoercionHelper module the coercion_helper generator writes once per output directory. A literal carrying a coercing scalar format claims its JSON class through a coercer, so every rendered formatted type converts on load and dump.