bintree 0.1.0

Binary Tree realisation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::knot::TreeKnot;

/// Ветвь дерева.
/// Хранит ключ (значение), правый и левый узел.
/// Используются те же трейты, что и для узла (см. knot.rs)

#[derive(Debug, Clone, PartialOrd, PartialEq)]
pub(crate) struct Node<T>
    where T: Copy + Clone + PartialOrd + PartialEq
{
    pub(crate) key: T,
    pub(crate) right: TreeKnot<T>,
    pub(crate) left: TreeKnot<T>,
}