make_impl is a helper function to make a simple impl, usually while deriving a trait.
This impl has a couple assumptions:
The impl only has one function, with the signature function_signature
The trait itself does not have any generics.
While these assumptions are met, make_impl will create an impl from a TypeDefinition,
automatically filling in the required generics from the type, along with the where clause.
The function body is created by mapping each field with for_each_field and joining the
results with join_fields_with. The result of this is passed to the body function for
any final processing - e.g. wrapping each field in a StructConstructor { .. } expression.
See derive_eq and derive_default for example usage.
make_implis a helper function to make a simple impl, usually while deriving a trait. This impl has a couple assumptions:function_signatureWhile these assumptions are met,
make_implwill create an impl from a TypeDefinition, automatically filling in the required generics from the type, along with the where clause. The function body is created by mapping each field withfor_each_fieldand joining the results withjoin_fields_with. The result of this is passed to thebodyfunction for any final processing - e.g. wrapping each field in aStructConstructor { .. }expression.See
derive_eqandderive_defaultfor example usage.