Using a macro makes this extension trait pattern easier and less repetitive.
There are five libraries on crates.io for this:
ext: Both reasonable candidates. I tried out both in a personal project and settled on
extend(because it handled a case I wanted).
extension-traithas very sparse docs.
ext-traitseem to be by the same person? The usage isn't as good.
.rs files of the extension trait commits is
5 files changed, 25 insertions(+), 56 deletions(-)