macro_rules! module_plugin_static_trait_define { ( $(#[$outer:meta])* $dyn_newtype:ident, $static_trait:ident, $dyn_trait:ident, { $($extra_methods:tt)* }, { $($extra_impls:tt)* } ) => { ... }; }
Expand description
Define a “plugin” trait
“Plugin trait” is a trait that a developer of a mint module needs to implement when implementing mint module. It uses associated types with trait bounds to guide the developer.
Blanket implementations are used to convert the “plugin trait”,
incompatible with dyn Trait
into “module types” and corresponding
“module dyn newtypes”, erasing the exact type and used in a common
Fedimint code.