coi-actix-web
Dependency Injection in Rust
This crate provides integration support between coi
and actix-web
.
Example
In your Cargo.toml
[]
= { = "coi-actix-web", = "0.4.0" }
Note
It's important to rename the package to
coi
since it re-exports proc-macros from thecoi
crate, which expects the crate to be namedcoi
.
and in your code:
use inject;
...
async get_all
See coi-actix-sample
for a more involved example.
License
SPDX-License-Identifier: MIT OR Apache-2.0