fn max(&self) -> Option<&K> {
        match self {
            RedBlackTree::Node {
                ref k,
                v: _,
                color: _,
                size: _,
                left: _,
                ref right,
            } => {
                if let Some(l) = right.max() {
                    Some(l)
                } else {
                    Some(k)
                }
            }
            _ => None,
        }
    }
/// Returns a optional reference to maximum key
///
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use treers::rbtree::RedBlackTree;
/// use treers::SedgewickMap;
///
/// let mut rbtree: RedBlackTree<char, i32> = RedBlackTree::new();
/// assert_eq!(rbtree.max(), None);
/// rbtree.put('c', 1);
/// rbtree.put('a', 2);
/// rbtree.put('b', 3);
/// rbtree.put('d', 4);
/// assert_eq!(rbtree.max(), Some(&'d'));
/// ```
Returns a optional reference to maximum key
Returns a optional reference to maximum key
fn max(&self) -> Option<&K> {
        match self {
            RedBlackTree::Node {
                ref k,
                v: _,
                color: _,
                size: _,
                left: _,
                ref right,
            } => {
                if let Some(l) = right.max() {
                    Some(l)
                } else {
                    Some(k)
                }
            }
            _ => None,
        }
    }
fn max ( & self ) -> Option < & K > { match self { RedBlackTree :: Node { ref k , v : _ , color : _ , size : _ , left : _ , ref right , } => { if let Some ( l ) = right . max ( ) { Some ( l ) } else { Some ( k ) } } _ => None , } }
Returns a optional reference to maximum key
Returns a optional reference to maximum key
&self
&self
examples
Basic usage.

```
use treers::rbtree::RedBlackTree;
use treers::SedgewickMap.

let mut rbtree: RedBlackTree = RedBlackTree::new();
assert_eq!(rbtree.max(), None);
rbtree.put('c', 1);
rbtree.put('a', 2);
rbtree.put('b', 3);
rbtree.put('d', 4);
assert_eq!(rbtree.max(), Some(&'d'));
```
Basic usage . ` ` ` use treers :: rbtree :: RedBlackTree ; use treers :: SedgewickMap . let mut rbtree : RedBlackTree = RedBlackTree :: new () ; assert_eq! ( rbtree . max () None ) ; rbtree . put ( ' c ' 1 ) ; rbtree . put ( ' a ' 2 ) ; rbtree . put ( ' b ' 3 ) ; rbtree . put ( ' d ' 4 ) ; assert_eq! ( rbtree . max () Some ( & ' d ' )) ; ` ` `