Package-level declarations

Types

Link copied to clipboard
@Serializable
data class TreeNodeDto<T>(val value: T, val children: List<TreeNodeDto<T>> = emptyList())

A serializable, acyclic view of a TreeNode subtree. TreeNode itself holds a back-reference to its parent (a cycle), so it cannot be @Serializable directly — convert to/from this DTO instead.

Functions

Link copied to clipboard

Converts this subtree into a serializable TreeNodeDto, preserving values and shape.

Link copied to clipboard

Rebuilds a mutable TreeNode tree from this DTO.