fork from https://github.com/rust-lang/impl-trait-utils
trait_variant
is a good lib, but it still doesn't support default method, so fork it and create a new lib trait-make
to support default method
users can replace trait_variant
with a few change
trait_make
trait_make
generates a specialized version of a base trait that uses async fn
and/or -> impl Trait
.
For example, if you want a Send
able version of your trait, you'd write:
The trait_make::make
would generate an additional trait called IntFactory
:
use Future;
Implementers can choose to implement either LocalIntFactory
or IntFactory
as appropriate.
For more details, see the docs for trait_make::make
.
License and usage notes
Licensed under either of Apache License, Version 2.0 or MIT license at your option.