pub fn push_front(&mut self, value: EntryData) -> Index<EntryData> {
        let head_index = match self.head() {
            Some(index) => index,
            None => return self.insert_empty(value),
        };
        let index = self.insert_new(value, None, Some(head_index));
        self.entries[head_index].occupied_mut().previous = Some(index);
        self.set_head(index);
        Index::new(index, self.generation)
    }
/// Inserts the given value to the front of the list.
///
/// The index of the newly inserted value will be returned.
///
/// Complexity: amortized O(1)
///
/// # Panics
///
/// Panics if the new capacity overflows `usize`.
///
/// # Examples
///
/// ```
/// use dlv_list::VecList;
///
/// let mut list = VecList::new();
/// let index = list.push_front(0);
/// assert_eq!(list.get(index), Some(&0));
/// ```
Inserts the given value to the front of the list.
The index of the newly inserted value will be returned.


Inserts the given value to the front of the list . The index of the newly inserted value will be returned .
pub fn push_front(&mut self, value: EntryData) -> Index<EntryData> {
        let head_index = match self.head() {
            Some(index) => index,
            None => return self.insert_empty(value),
        };
        let index = self.insert_new(value, None, Some(head_index));
        self.entries[head_index].occupied_mut().previous = Some(index);
        self.set_head(index);
        Index::new(index, self.generation)
    }
pub fn push_front ( & mut self , value : EntryData ) -> Index < EntryData > { let head_index = match self . head ( ) { Some ( index ) => index , None => return self . insert_empty ( value ) , } ; let index = self . insert_new ( value , None , Some ( head_index ) ) ; self . entries [ head_index ] . occupied_mut ( ) . previous = Some ( index ) ; self . set_head ( index ) ; Index :: new ( index , self . generation ) }
Inserts the given value to the front of the list.
Inserts the given value to the front of the list .
&mut self
value
EntryData
&mut self
value
EntryData
panics
Panics if the new capacity overflows `usize`.
Panics if the new capacity overflows ` usize ` .
examples
```
use dlv_list::VecList.

let mut list = VecList::new();
let index = list.push_front(0);
assert_eq!(list.get(index), Some(&0));
```
` ` ` use dlv_list :: VecList . let mut list = VecList :: new () ; let index = list . push_front ( 0 ) ; assert_eq! ( list . get ( index ) Some ( &0 )) ; ` ` `