With custom derive we can currently create multiple items from an attribute attached to a struct.
Is it possible to create new functions that are not inside the impl from a proc macro attached to an "impl X for Y"? (I appreciate that I can modify the contents of the impl to my hearts content). I've had a look into how custom derive does it (MultiItemModifier) but my understanding is that MultiItemModifier is being phased out in preference of something else.
- Q1: Does the something else exist yet?
- Q2: If I try and use MultiItemModifier on an impl is it likely to work or will it tell me that only custom derive is allowed to use it?
https://github.com/rust-lang/rust/blob/master/src/libsyntax_ext/deriving/custom.rs