summaryrefslogtreecommitdiffstats
path: root/src/router/types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/router/types.rs')
-rw-r--r--src/router/types.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/router/types.rs b/src/router/types.rs
new file mode 100644
index 0000000..0b5e162
--- /dev/null
+++ b/src/router/types.rs
@@ -0,0 +1,7 @@
+pub trait Opaque: Send + Sync + 'static {}
+
+impl<T> Opaque for T where T: Send + Sync + 'static {}
+
+pub trait Callback<T>: Fn(&T, bool) -> () + Sync + Send + 'static {}
+
+impl<T, F> Callback<T> for F where F: Fn(&T, bool) -> () + Sync + Send + 'static {}