Skip to main content

impl_provider

Macro impl_provider 

Source
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 (without dyn prefix).

§Example

impl_provider!(CommandExecutor);

Expands to:

impl Requires<dyn CommandExecutor> for MountainEnvironment {
    fn Require(&self) -> Arc<dyn CommandExecutor> {
        Arc::new(self.clone())
    }
}