Skip to content

Commit

Permalink
feat(di): Lifetimes support (#20)
Browse files Browse the repository at this point in the history
Adds support for lifetimes on dependencies. The usual big three are supported:
- Singleton
- Scoped
- Transient

These lifetimes also work for `async` dependencies.
  • Loading branch information
chesedo authored Sep 18, 2024
1 parent 6df1fea commit 654c716
Show file tree
Hide file tree
Showing 52 changed files with 3,173 additions and 870 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ members = [
]

[workspace.dependencies]
async-once-cell = "0.5.0"
macrotest = "1.0"
pretty_assertions = "1.0"
proc-macro2 = "1.0"
Expand Down
9 changes: 6 additions & 3 deletions despatma-dependency-container/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@ proc-macro = true

[dependencies]
despatma-visitor = { version = "0.3.2", path = "../despatma-visitor" }
indexmap = "2.4.0"
proc-macro-error = "1.0.4"
proc-macro2.workspace = true
quote.workspace = true
strsim = "0.11.1"
syn = { workspace = true, features = ["full"] }
syn = { workspace = true, features = ["extra-traits", "full"] }

[dev-dependencies]
async-once-cell.workspace = true
auto_impl = "1.2.0"
macrotest.workspace = true
pretty_assertions.workspace = true
syn = { workspace = true, features = ["extra-traits"] }
tokio = { version = "1.39.2", features = ["macros", "rt-multi-thread", "time"] }
trybuild.workspace = true

[features]
default = ["standalone"]
standalone = []
Loading

0 comments on commit 654c716

Please sign in to comment.