alef 0.20.4

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// NodeContext carries context information passed to every visitor callback.
// It is decoded from the JSON-encoded context string passed by the C layer.
type NodeContext struct {
	// NodeType is a coarse-grained node type tag.
	NodeType NodeType `json:"node_type"`
	// TagName is the HTML element tag name (e.g. "div").
	TagName string `json:"tag_name"`
	// Depth is the DOM depth (0 = root).
	Depth uint `json:"depth"`
	// IndexInParent is the 0-based sibling index.
	IndexInParent uint `json:"index_in_parent"`
	// ParentTag is the parent element tag name, or nil at the root.
	ParentTag *string `json:"parent_tag"`
	// IsInline is true when this element is treated as inline.
	IsInline bool `json:"is_inline"`
}