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

Class BST

code/chapter07/bst.rs:8–13  ·  view source on GitHub ↗

二叉查找树定义

Source from the content-addressed store, hash-verified

6
7// 二叉查找树定义
8struct BST<T,U> {
9 key: Option<T>,
10 val: Option<U>,
11 left: Link<T,U>,
12 right: Link<T,U>,
13}
14
15impl<T,U> BST<T,U>
16where T: Clone + Ord + Debug,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected