Closed PokeJofeJr4th closed 4 months ago
While it would be nice to be able to use the names of the getters, I don't think this is a big issue. I think we can go ahead with this version.
I think this should be documented in the bitfield
docs too.
Alright, everything you mentioned here should be addressed at this point. Let me know if there's anything else I can work on!
Nice! Thanks very much for your work. Will release this ASAP.
As of this writing, using
impl new;
creates a constructor with parameters and calls for all setters. Usingimpl new {func_name(setter: ty, ...);
creates a constructor calledfunc_name
with the specified arguments that calls setters with the given type.Ideally I'd want to use the names of the getters as function parameters, since those are generally a better representation of what the field is, and I'd like to grab the types from the field definition as well. However, unless there's a good way to check if two identifiers are the same, this seems impossible to do without procedural macros
Originally #18