diff --git a/src/function/mod.rs b/src/function/mod.rs index 029b00e..21f27e5 100644 --- a/src/function/mod.rs +++ b/src/function/mod.rs @@ -41,3 +41,9 @@ impl fmt::Debug for Function { write!(f, "Function {{ [...] }}") } } + +/// A trait to ensure a type is `Send` and `Sync`. +/// If implemented for a type, the crate will not compile if the type is not `Send` and `Sync`. +trait IsSendAndSync: Send + Sync {} + +impl IsSendAndSync for Function {}