fn index_mut(&mut self, index: usize) -> &mut Self::Output {
        match *self {
            Pod::Array(ref mut vec) => {
                let in_bounds = index < vec.len();
                if in_bounds {
                    &mut vec[index]
                } else {
                    vec.push(Pod::Null);
                    vec.last_mut().unwrap()
                }
            }
            _ => {
                *self = Pod::new_array();
                self.push(Pod::Null).unwrap();
                self.index_mut(index)
            }
        }
    }
/// Easily access mutable element of Pod::Array by usize index
Easily access mutable element of Pod::Array by usize index
Easily access mutable element of Pod :: Array by usize index
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
        match *self {
            Pod::Array(ref mut vec) => {
                let in_bounds = index < vec.len();
                if in_bounds {
                    &mut vec[index]
                } else {
                    vec.push(Pod::Null);
                    vec.last_mut().unwrap()
                }
            }
            _ => {
                *self = Pod::new_array();
                self.push(Pod::Null).unwrap();
                self.index_mut(index)
            }
        }
    }
fn index_mut ( & mut self , index : usize ) -> & mut Self :: Output { match * self { Pod :: Array ( ref mut vec ) => { let in_bounds = index < vec . len ( ) ; if in_bounds { & mut vec [ index ] } else { vec . push ( Pod :: Null ) ; vec . last_mut ( ) . unwrap ( ) } } _ => { * self = Pod :: new_array ( ) ; self . push ( Pod :: Null ) . unwrap ( ) ; self . index_mut ( index ) } } }
Easily access mutable element of Pod::Array by usize index
Easily access mutable element of Pod :: Array by usize index
&mut self
index
usize
&mut self
index
usize