Enables the developer to not have to pass in params specs for items that had mapping functions.
Currently ParamsSpec and related types -- ParamsSpecFieldless, ValueSpec, FieldWiseSpec (generated by proc macro) -- hold MappingFns within their type.
This forces users to respecify the params specs with mapping functions in subsequent CmdCtx::builder_* instantiation.
This change is to:
- Get developers to instantiate a
Map<MappingFnK, Box<dyn MappingFn>>, and pass that to CmdCtx::builder_*.
ParamsSpec and related types will hold the MappingFnK.
- Developers should define the
MappingFnK, an all-unit-variant enum with sensible names to identify the mapping function.
Enables the developer to not have to pass in params specs for items that had mapping functions.
Currently
ParamsSpecand related types --ParamsSpecFieldless,ValueSpec,FieldWiseSpec(generated by proc macro) -- holdMappingFns within their type.This forces users to respecify the params specs with mapping functions in subsequent
CmdCtx::builder_*instantiation.This change is to:
Map<MappingFnK, Box<dyn MappingFn>>, and pass that toCmdCtx::builder_*.ParamsSpecand related types will hold theMappingFnK.MappingFnK, an all-unit-variant enum with sensible names to identify the mapping function.