mirror of
https://github.com/robertwayne/axum-htmx
synced 2025-12-18 13:45:17 +01:00
Middleware as tower layer
This commit is contained in:
parent
57e3e067b1
commit
386662b0a8
3 changed files with 84 additions and 44 deletions
11
Cargo.toml
11
Cargo.toml
|
|
@ -15,18 +15,13 @@ default = []
|
|||
unstable = []
|
||||
guards = ["tower", "futures-core", "pin-project-lite"]
|
||||
serde = ["dep:serde", "dep:serde_json"]
|
||||
auto-vary = ["axum", "futures", "tokio"]
|
||||
auto-vary = ["futures", "tokio", "tower"]
|
||||
|
||||
[dependencies]
|
||||
axum-core = "0.4"
|
||||
http = { version = "1.0", default-features = false }
|
||||
async-trait = "0.1"
|
||||
|
||||
# Optional dependencies required for the `auto-vary` feature.
|
||||
axum = { version = "0.7", default-features = false, optional = true }
|
||||
tokio = { version = "1", features = ["sync"], optional = true }
|
||||
futures = { version = "0.3", default-features = false, optional = true }
|
||||
|
||||
# Optional dependencies required for the `guards` feature.
|
||||
tower = { version = "0.4", default-features = false, optional = true }
|
||||
futures-core = { version = "0.3", optional = true }
|
||||
|
|
@ -36,6 +31,10 @@ pin-project-lite = { version = "0.2", optional = true }
|
|||
serde = { version = "1", features = ["derive"], optional = true }
|
||||
serde_json = { version = "1", optional = true }
|
||||
|
||||
# Optional dependencies required for the `auto-vary` feature.
|
||||
tokio = { version = "1", features = ["sync"], optional = true }
|
||||
futures = { version = "0.3", default-features = false, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
axum = { version = "0.7", default-features = false }
|
||||
axum-test = "15"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue