-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ParamsSpec
: Store Mapping Functions Separately
#156
Comments
ParamsSpecs
: Store Mapping Functions SeparatelyParamsSpec
: Store Mapping Functions Separately
Considering the value of this. Summary
With ItDevelopers
Users
Framework Maintainers
Without ItDevelopers
When the closure passed to UsersNo runtime error, because it will be caught at compile time. Framework Maintainers
|
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) -- holdMappingFn
s 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_*
.ParamsSpec
and related types will hold theMappingFnK
.MappingFnK
, an all-unit-variant enum with sensible names to identify the mapping function.The text was updated successfully, but these errors were encountered: