/**
    Places elements at the beginning of the buffer.

    If the buffer is full, it replaces elements from the back of the buffer.

    # Example

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

    fn main(){
        let mut cb:CircularBuffer<i32> = CircularBuffer::new(3);

        cb.push_front(1);
        cb.push_front(2);
        cb.push_front(3);
        assert_eq!(cb, [3,2,1].as_ref());
        cb.push_front(4);
        assert_eq!(cb, [4,3,2].as_ref());
    }
    ```
    */
Places elements at the beginning of the buffer.
If the buffer is full, it replaces elements from the back of the buffer.
Places elements at the beginning of the buffer . If the buffer is full it replaces elements from the back of the buffer .
pub fn push_front(&mut self, val: T) {
        if self.is_full(){
            if self.capacity() == 0 {
                return;
            } else {
                self.pop_back();
            }
        }
        self.decr_start();
        self.push_at(val, self.start);
    }
pub fn push_front ( & mut self , val : T ) { if self . is_full ( ) { if self . capacity ( ) == 0 { return ; } else { self . pop_back ( ) ; } } self . decr_start ( ) ; self . push_at ( val , self . start ) ; }
Places elements at the beginning of the buffer.
Places elements at the beginning of the buffer .
&mut self
val
T
example
```
use advanced_collections::circular_buffer::CircularBuffer.

fn main(){
let mut cb:CircularBuffer = CircularBuffer::new(3).


` ` ` use advanced_collections :: circular_buffer :: CircularBuffer . fn main () { let mut cb : CircularBuffer = CircularBuffer :: new ( 3 ) .