Struct style::dom::OpaqueNode
[−]
[src]
pub struct OpaqueNode(pub usize);
An opaque handle to a node, which, unlike UnsafeNode, cannot be transformed back into a non-opaque representation. The only safe operation that can be performed on this node is to compare it to another opaque handle or to another OpaqueNode.
Layout and Graphics use this to safely represent nodes for comparison purposes.
Because the script task's GC does not trace layout, node data cannot be safely stored in layout
data structures. Also, layout code tends to be faster when the DOM is not being accessed, for
locality reasons. Using OpaqueNode
enforces this invariant.
Methods
impl OpaqueNode
[src]
Trait Implementations
impl Clone for OpaqueNode
[src]
fn clone(&self) -> OpaqueNode
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for OpaqueNode
[src]
impl Debug for OpaqueNode
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Eq for OpaqueNode
[src]
impl Hash for OpaqueNode
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for OpaqueNode
[src]
fn eq(&self, __arg_0: &OpaqueNode) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &OpaqueNode) -> bool
[src]
This method tests for !=
.
impl MallocSizeOf for OpaqueNode
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more