[][src]Struct leetcode_prelude::TreeNode

pub struct TreeNode {
    pub val: i32,
    pub left: Option<Rc<RefCell<TreeNode>>>,
    pub right: Option<Rc<RefCell<TreeNode>>>,
}

Definition for a binary tree node.

Note

I add Ord PartialOrd for sort Vec when testing Please don't rely on it

Fields

val: i32left: Option<Rc<RefCell<TreeNode>>>right: Option<Rc<RefCell<TreeNode>>>

Methods

impl TreeNode[src]

pub fn new(val: i32) -> Self[src]

Trait Implementations

impl PartialEq<TreeNode> for TreeNode[src]

impl Ord for TreeNode[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Eq for TreeNode[src]

impl PartialOrd<TreeNode> for TreeNode[src]

impl Debug for TreeNode[src]

Auto Trait Implementations

impl !Send for TreeNode

impl !Sync for TreeNode

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.