Consider serialization functions that may throw when outputting Trie.