aboutsummaryrefslogtreecommitdiff
path: root/src/handler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/handler.rs')
-rw-r--r--src/handler.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/handler.rs b/src/handler.rs
index 7e297f8..5377703 100644
--- a/src/handler.rs
+++ b/src/handler.rs
@@ -18,7 +18,8 @@
use crate::{returnable::RouteContext, Response};
-pub type RouteResponse = fn(RouteContext<'_>) -> Response<'_>;
+pub type RouteResponse =
+ Box<dyn FnMut(RouteContext<'_>) -> Response<'_> + Send + Sync>;
pub type ErrorResponse = Box<
dyn FnMut(crate::returnable::ErrorContext<'_>) -> Response<'_> + Send + Sync,
>;