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

Class BST

publication/code/chapter08/bst.rs:52–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50// 二叉查找树定义
51#[derive(Debug,Clone)]
52struct BST<T,U> {
53 key: Option<T>,
54 val: Option<U>,
55 left: Link<T,U>,
56 right: Link<T,U>,
57}
58
59impl<T,U> BST<T,U>
60 where T: Copy + Ord + Debug,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected