Add a Reflectable bound to Trusted's type parameter.

This commit is contained in:
Ms2ger 2015-05-01 21:19:46 +02:00
parent b59f54ce81
commit 5f6b791e62

View file

@ -47,7 +47,7 @@ unsafe impl Send for TrustedReference {}
/// shared among tasks for use in asynchronous operations. The underlying
/// DOM object is guaranteed to live at least as long as the last outstanding
/// `Trusted<T>` instance.
pub struct Trusted<T> {
pub struct Trusted<T: Reflectable> {
/// A pointer to the Rust DOM object of type T, but void to allow
/// sending `Trusted<T>` between tasks, regardless of T's sendability.
ptr: *const libc::c_void,