aboutsummaryrefslogtreecommitdiff
path: root/src/returnable.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-04-02 00:48:47 +0000
committerFuwn <[email protected]>2022-04-02 00:48:47 +0000
commit8869b6ef044aa42043f8e17ee0d56767730d56fc (patch)
tree465d58df7fd5ec125f7ebe9400e6b6d28ed8c7ff /src/returnable.rs
parentbuild(cargo): simplify example usage (diff)
downloadwindmark-8869b6ef044aa42043f8e17ee0d56767730d56fc.tar.xz
windmark-8869b6ef044aa42043f8e17ee0d56767730d56fc.zip
feat(router): stateful modules!
Diffstat (limited to 'src/returnable.rs')
-rw-r--r--src/returnable.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/returnable.rs b/src/returnable.rs
index 8f4ee81..31d7e4f 100644
--- a/src/returnable.rs
+++ b/src/returnable.rs
@@ -51,3 +51,22 @@ impl<'a> ErrorContext<'a> {
}
}
}
+
+pub struct CallbackContext<'a> {
+ pub tcp: &'a TcpStream,
+ pub url: &'a Url,
+ pub params: Option<&'a Params<'a, 'a>>,
+}
+impl<'a> CallbackContext<'a> {
+ pub const fn new(
+ tcp: &'a TcpStream,
+ url: &'a Url,
+ params: Option<&'a Params<'a, 'a>>,
+ ) -> Self {
+ Self {
+ tcp,
+ url,
+ params,
+ }
+ }
+}