Macro app_frame::inject

source ·
macro_rules! inject {
    (
        $(#[$outer:meta])*
        pub struct $Name:ident {
            $($viz:vis $field:ident: $FieldType:ty),*$(,)?
        }
    ) => { ... };
}
Expand description

Implement constructors that can be used for dependency injection:

  • new method for each field
  • impl From<&T> where T: Provide for every field