pub struct Dom<T> {
ptr: NonNull<T>,
}
Expand description
A traced reference to a DOM object
This type is critical to making garbage collection work with the DOM,
but it is very dangerous; if garbage collection happens with a Dom<T>
on the stack, the Dom<T>
can point to freed memory.
This should only be used as a field in other DOM objects.
Fields§
§ptr: NonNull<T>
Implementations§
Trait Implementations§
source§impl<T: DomObject> JSTraceable for Dom<T>
impl<T: DomObject> JSTraceable for Dom<T>
source§impl<T> MallocSizeOf for Dom<T>
impl<T> MallocSizeOf for Dom<T>
source§fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl<'a, T: DomObject> PartialEq<&'a T> for Dom<T>
impl<'a, T: DomObject> PartialEq<&'a T> for Dom<T>
source§impl<T> PartialEq<Dom<T>> for Dom<T>
impl<T> PartialEq<Dom<T>> for Dom<T>
source§impl<T> StableTraceObject for Dom<T>where
T: DomObject,
impl<T> StableTraceObject for Dom<T>where
T: DomObject,
source§fn stable_trace_object<'a>(&'a self) -> *const dyn JSTraceable
fn stable_trace_object<'a>(&'a self) -> *const dyn JSTraceable
Returns a stable trace object which address won’t change for the whole
lifetime of the value.
impl<T> Eq for Dom<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Dom<T>where
T: RefUnwindSafe,
impl<T> !Send for Dom<T>
impl<T> !Sync for Dom<T>
impl<T> Unpin for Dom<T>
impl<T> UnwindSafe for Dom<T>where
T: RefUnwindSafe,
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert