Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshal ¶
func Marshal[T comparable](root NodeMarshaler[T]) ([]byte, error)
Types ¶
type Node ¶
type Node[T comparable] interface { String() string // String returns node self information Parent() T // Parent returns parent node or nil NumChild() int // NumChild returns number of child GetChildByIndex(i int) T // GetChildByIndex gets child by index }
Node represents a generic printable node
type NodeMarshaler ¶
type NodeMarshaler[T comparable] interface { Node[T] Marshal() ([]byte, error) }
Click to show internal directories.
Click to hide internal directories.