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:
-
extend
andext
: Both reasonable candidates. I tried out both in a personal project and settled onextend
(because it handled a case I wanted). -
extension-trait
has very sparse docs. -
extension-traits
andext-trait
seem 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(-)