macro_rules! impl_provider {
($trait_name:ident) => { ... };
}Expand description
Macro to generate Requires<dyn T> trait implementations for
MountainEnvironment.
§Arguments
$trait_name- The name of the trait (withoutdynprefix).
§Example
ⓘ
impl_provider!(CommandExecutor);Expands to:
ⓘ
impl Requires<dyn CommandExecutor> for MountainEnvironment {
fn Require(&self) -> Arc<dyn CommandExecutor> {
Arc::new(self.clone())
}
}