pub fn clear(&mut self) {
        self.entries.clear();
        self.generation = self.generation.wrapping_add(1);
        self.head = None;
        self.length = 0;
        self.tail = None;
        self.vacant_head = None;
    }
/// Removes all values from the list and invalidates all existing indices.
///
/// Complexity: O(n)
///
/// # Examples
///
/// ```
/// use dlv_list::VecList;
///
/// let mut list = VecList::new();
///
/// list.push_back(5);
/// assert!(!list.is_empty());
///
/// list.clear();
/// assert!(list.is_empty());
/// ```
Removes all values from the list and invalidates all existing indices.
Removes all values from the list and invalidates all existing indices .
pub fn clear(&mut self) {
        self.entries.clear();
        self.generation = self.generation.wrapping_add(1);
        self.head = None;
        self.length = 0;
        self.tail = None;
        self.vacant_head = None;
    }
pub fn clear ( & mut self ) { self . entries . clear ( ) ; self . generation = self . generation . wrapping_add ( 1 ) ; self . head = None ; self . length = 0 ; self . tail = None ; self . vacant_head = None ; }
Removes all values from the list and invalidates all existing indices.
Removes all values from the list and invalidates all existing indices .
&mut self
&mut self
examples
```
use dlv_list::VecList.

let mut list = VecList::new().

list.push_back(5);
assert!(!list.is_empty()).


` ` ` use dlv_list :: VecList . let mut list = VecList :: new () . list . push_back ( 5 ) ; assert! ( !list . is_empty () ) .