injectable-rs 0.1.0

A compile-time dependency injection framework for Rust using extractor-based DI
Documentation
//! Compile-fail test: unknown attribute in #[injectable(...)].
//!
//! Only `scope` is a valid attribute for #[injectable] on an impl block.

#![allow(unused_imports)]

use injectable_rs::injectable;

pub struct MyService {
    name: String,
}

#[injectable(bad = "value")]
impl MyService {
    #[injectable(ctor)]
    pub fn new() -> Self {
        Self { name: "default".to_string() }
    }
}

fn main() {}