[−][src]Trait intrusive_splay_tree::IntrusiveNode
Defines how to get the intrusive node from a particular kind of
SplayTree
's element type.
Don't implement this by hand -- doing so is both boring and dangerous!
Instead, use the impl_intrusive_node!
macro.
Associated Types
Loading content...Required methods
fn elem_to_node(elem: &'a Self::Elem) -> &'a Node<'a>
Get the node for this tree from the given element.
unsafe fn node_to_elem(node: &'a Node<'a>) -> &'a Self::Elem
Get the element for this node (by essentially doing offsetof
the
node's field).
Safety
Given a node inside a different element type, or a node for a different tree within the same element type, this method will result in memory unsafety.