I am trying to write a macro pattern that will match any standard impl definition so I can pull apart the parts in my macro.
Can anyone point me at an example of a macro that does this? My challenge is that I have trouble understanding what the different macro argument types mean.
Parsing an impl definition is beyond what macro_rules can do. Even just correctly parsing the set of generic parameters like impl<A, B: Trait<A>> is already extremely involved and requires something like tt-call to stay sane.
Consider instead writing your macro as a procedural macro (stabilized in Rust 1.30) and using Syn to parse the input as a syn::ItemImpl which contains the components of the impl definition broken out into a syntax tree for you.