/**
    Returns a mutable reference to the first element of the buffer.

    Returns `None` if the buffer is empty.

    # Example

    ```
    use advanced_collections::circular_buffer::CircularBuffer;

    fn main(){
       let mut cb = CircularBuffer::from(vec![1,2,3]);
       *cb.first_mut().unwrap() +=1;
       assert_eq!(cb, [2,2,3].as_ref());
    }
    ```
    */
Returns a mutable reference to the first element of the buffer.
Returns `None` if the buffer is empty.
Returns a mutable reference to the first element of the buffer . Returns ` None ` if the buffer is empty .
pub fn first_mut(&mut self) -> Option<&mut T> {
        if self.is_empty(){
            None
        } else {
            Some(&mut *self.buffer[self.internal_index(0)])
        }
    }
pub fn first_mut ( & mut self ) -> Option < & mut T > { if self . is_empty ( ) { None } else { Some ( & mut * self . buffer [ self . internal_index ( 0 ) ] ) } }
Returns a mutable reference to the first element of the buffer.
Returns a mutable reference to the first element of the buffer .
&mut self
example
```
use advanced_collections::circular_buffer::CircularBuffer.


` ` ` use advanced_collections :: circular_buffer :: CircularBuffer .