Add an encode() method and a way to make arbitrary types support ToTreeNode if they're encodable (we don't support it on everything as we already have different to_tree_node() methods for some encodable types)
Add an encode() method and a way to make arbitrary types support ToTreeNode if they're encodable (we don't support it on everything as we already have different to_tree_node() methods for some encodable types)

Logicalshift/tame-tree