From 8869b6ef044aa42043f8e17ee0d56767730d56fc Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 2 Apr 2022 00:48:47 +0000 Subject: feat(router): stateful modules! --- src/returnable.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/returnable.rs') 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, + } + } +} -- cgit v1.2.3