Make DomRoot<T> a type alias of a more general Root<T> type

This Root<T> relies on the concept of a stable trace object, which doesn't
move for the whole lifetime of the T value. For safety reasons, T must be 'static.

The only implementor of StableTraceObject for now is Dom<T>.
This commit is contained in:
Anthony Ramine 2017-09-28 14:51:23 +02:00
parent 7574d26476
commit dee38475b8
2 changed files with 108 additions and 60 deletions

View file

@ -72,7 +72,7 @@ impl Reflector {
}
/// A trait to provide access to the `Reflector` for a DOM object.
pub trait DomObject {
pub trait DomObject: 'static {
/// Returns the receiver's reflector.
fn reflector(&self) -> &Reflector;