Struct leetcode_trees_rs::utils::TreeNode
source · pub struct TreeNode {
pub val: i32,
pub left: Option<Rc<RefCell<TreeNode>>>,
pub right: Option<Rc<RefCell<TreeNode>>>,
}
Expand description
The TreeNode signature is entirely 1:1 with LeetCode with additional optional features like serde.
Fields§
§val: i32
This uses normal i32 values that can be serialized and deserialized using serde if wanted.
left: Option<Rc<RefCell<TreeNode>>>
§right: Option<Rc<RefCell<TreeNode>>>
Implementations§
Trait Implementations§
source§impl PartialEq for TreeNode
impl PartialEq for TreeNode
impl Eq for TreeNode
impl StructuralPartialEq for TreeNode
Auto Trait Implementations§
impl Freeze for TreeNode
impl !RefUnwindSafe for TreeNode
impl !Send for TreeNode
impl !Sync for TreeNode
impl Unpin for TreeNode
impl !UnwindSafe for TreeNode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more