aboutsummaryrefslogtreecommitdiff
path: root/src/handler.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-27 11:38:41 +0000
committerFuwn <[email protected]>2022-03-27 11:38:41 +0000
commitc60dd3ceda6b818271a48765f676bf3505dcbbeb (patch)
treed4a9a8caa94f259c2fef30e9cafea3d0533451de /src/handler.rs
parentfeat(handler): fnmut partial (diff)
downloadwindmark-c60dd3ceda6b818271a48765f676bf3505dcbbeb.tar.xz
windmark-c60dd3ceda6b818271a48765f676bf3505dcbbeb.zip
feat(handler): more fnmut
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,
>;