1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#[macro_export] macro_rules! init { ( ) => { pub mod dose_private { pub trait Injector<T> { fn get(&mut self) -> T; } } }; } #[macro_export] macro_rules! get { ($context:expr) => {{ use crate::dose_private::Injector; $context.get() }}; }