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]

[src]

Returns the address of this node, for debugging purposes.

Trait Implementations

impl Clone for OpaqueNode
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for OpaqueNode
[src]

impl Debug for OpaqueNode
[src]

[src]

Formats the value using the given formatter. Read more

impl Eq for OpaqueNode
[src]

impl Hash for OpaqueNode
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for OpaqueNode
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl MallocSizeOf for OpaqueNode
[src]

[src]

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more