[−][src]Attribute Macro coi_rocket_derive::inject
#[inject]
The #inject proc macro should only be applied to functions that will
be passed to rocket
's routing APIs.
Examples
#![feature(decl_macro)] use coi::Inject; use coi_rocket::inject; use rocket::get; use std::sync::Arc; #[inject] #[get("/path")] fn get_all(#[inject] service: Arc<dyn IService>) -> String { // use service here... String::from("Hello, World") }