MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / BinaryTree

Class BinaryTree

publication/code/chapter08/binary_tree.rs:53–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51// key 保存数据、left 和 right 保存左右子节点
52#[derive(Debug, Clone, PartialEq)]
53struct BinaryTree<T> {
54 key: T,
55 left: Link<T>,
56 right: Link<T>,
57}
58
59impl<T: Clone + Ord + ToString + Debug> BinaryTree<T> {
60 // 构建新树

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected