aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-03-31 22:14:34 +0000
committerFuwn <[email protected]>2023-03-31 22:14:34 +0000
commit66fa418e39c20695e3a1a9e08dcde898fcd3af7d (patch)
tree7be79d0886df9b6934c5834c27828cd207a92b95
parentfeat(response): macro-based responses (diff)
downloadwindmark-0.2.4.tar.xz
windmark-0.2.4.zip
fix(cargo): response-macros feature flagv0.2.4
-rw-r--r--Cargo.toml1
-rw-r--r--README.md3
-rw-r--r--src/response.rs1
3 files changed, 5 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 95b8dbb..1d32896 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,6 +17,7 @@ categories = ["web-programming"]
[features]
logger = ["pretty_env_logger"]
auto-deduce-mime = ["tree_magic"]
+response-macros = []
[dependencies]
# SSL
diff --git a/README.md b/README.md
index cfa5808..24c2a45 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,9 @@ tokio = { version = "0.2.4", features = ["full"] }
# If you would like to use the built-in MIME dedection when `Success`-ing a file
# (recommended)
# windmark = { version = "0.2.4", features = ["auto-deduce-mime"] }
+
+# If you would like to use macro-based responses (as seen below)
+# windmark = { version = "0.2.4", features = ["response-macros"] }
```
### Implement a Windmark server
diff --git a/src/response.rs b/src/response.rs
index 455bf42..9c1629a 100644
--- a/src/response.rs
+++ b/src/response.rs
@@ -18,6 +18,7 @@
//! Content and response handlers
+#[cfg(feature = "response-macros")]
mod macros;
macro_rules! response {