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