Expand description
Wraps a value in TreeNode
all in one function, of any scale.
Functionsยง
- new_
cell - Create a
RefCell<TreeNode>
with given value. - new_
node - Create a complete node(
Option<Rc<RefCell<TreeNode>>>
) with given value. - new_rc
- Create a
Rc<RefCell<TreeNode>>
with given value. - to_ptr
- Convert the rust style mutable pointer(specified in leetcode) into C/C++ style immutable pointer.
- to_
ptr_ mut - Convert the rust style mutable pointer(specified in leetcode) into C/C++ style mutable pointer.
- val
- Access the value pointed by the given pointer.