pub fn peek_mut(&mut self) -> Option<WeakHeapPeekMut<'_, T>> {
        if self.is_empty() {
            None
        } else {
            Some(WeakHeapPeekMut {
                heap: self,
                sift: false,
            })
        }
    }
/// Returns a mutable reference to the greatest item in the weak heap, or
/// `None` if it is empty.
///
/// Note: If the `WeakHeapPeekMut` value is leaked, the heap may be in an
/// inconsistent state.
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use weakheap::WeakHeap;
/// let mut heap = WeakHeap::new();
/// assert!(heap.peek_mut().is_none());
///
/// heap.push(1);
/// heap.push(5);
/// heap.push(2);
/// {
///     let mut val = heap.peek_mut().unwrap();
///     *val = 0;
/// }
/// assert_eq!(heap.peek(), Some(&2));
/// ```
///
/// # Time complexity
///
/// If the item is modified then the worst case time complexity is *O*(log(*n*)),
/// otherwise it's *O*(1).
Returns a mutable reference to the greatest item in the weak heap, or
`None` if it is empty.

If the `WeakHeapPeekMut` value is leaked, the heap may be in an
inconsistent state.
Returns a mutable reference to the greatest item in the weak heap or ` None ` if it is empty . If the ` WeakHeapPeekMut ` value is leaked the heap may be in an inconsistent state .
pub fn peek_mut(&mut self) -> Option<WeakHeapPeekMut<'_, T>> {
        if self.is_empty() {
            None
        } else {
            Some(WeakHeapPeekMut {
                heap: self,
                sift: false,
            })
        }
    }
pub fn peek_mut ( & mut self ) -> Option < WeakHeapPeekMut < ' _ , T > > { if self . is_empty ( ) { None } else { Some ( WeakHeapPeekMut { heap : self , sift : false , } ) } }
Returns a mutable reference to the greatest item in the weak heap, or
`None` if it is empty.
Returns a mutable reference to the greatest item in the weak heap or ` None ` if it is empty .
&mut self
examples
Basic usage.

```
use weakheap::WeakHeap;
let mut heap = WeakHeap::new();
assert!(heap.peek_mut().is_none()).


Basic usage . ` ` ` use weakheap :: WeakHeap ; let mut heap = WeakHeap :: new () ; assert! ( heap . peek_mut () . is_none () ) .
time complexity
If the item is modified then the worst case time complexity is *O*(log(*n*)),
otherwise it's *O*(1).
If the item is modified then the worst case time complexity is * O * ( log ( * n * )) otherwise it ' s * O * ( 1 ) .