aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
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>;
+}