aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-12-24 16:25:51 -0700
committerMelody Horn <melody@boringcactus.com>2021-12-24 16:25:51 -0700
commit3817ec811d76b91d3d4924003a4d48d0cd43a576 (patch)
tree93cd9ac73e08c9d4414bb312f7a01f104581a160 /src/utils.rs
parentc6d12d80babd9f4bd5692cf74ab9d6e9278859d1 (diff)
downloadnarchttpd-3817ec811d76b91d3d4924003a4d48d0cd43a576.tar.gz
narchttpd-3817ec811d76b91d3d4924003a4d48d0cd43a576.zip
rust is a myth. it doesn't existconfig-toml
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 0bd5c2e..ebc21f2 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1,2 +1,10 @@
+use async_trait::async_trait;
+use hyper::{Body, Request, Response};
+
pub mod proxy_child;
pub mod serve_static;
+
+#[async_trait]
+pub trait HttpHandler: Send + Sync {
+ async fn handle(&self, request: Request<Body>) -> Response<Body>;
+}