Skip to main content

DeriveNode

Derive Macro DeriveNode 

Source
#[derive(DeriveNode)]
Expand description

Derive the Node trait for a newtype wrapper around Handle.

Use this for non-element node types that cannot have children or attributes (e.g., TextNode, CommentNode).

§Example

#[derive(Copy, Clone, Node)]
pub struct TextNode(Handle);

Generates impl Node for TextNode and impl Debug for TextNode.