Ensure that Function implements Send and Sync.

Relates to #76
This commit is contained in:
Sebastian Schmidt 2021-05-28 14:27:41 +03:00
parent bee98999db
commit 77e148fcd4

View File

@ -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 {}