caelix-macros 0.0.37

Procedural macros for the Caelix framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use caelix_core as caelix;
use caelix_core::Container;
use caelix_macros::injectable;

#[injectable]
struct Logger;

async fn exercise() {
    let mut container = Container::new();
    container.register::<Logger>().await.unwrap();

    let _logger = container.resolve::<Logger>().unwrap();
}

fn main() {
    std::mem::drop(exercise());
}