Function get_mut

Source
pub fn get_mut<'a, T>(v: &'a mut Vec<T>, index: usize) -> Option<&'a mut T>
Expand description

Get a mut ref of a specific element of a Vec.

§Arguments

  • v - The mut ref of the Vec<T>
  • index - The index of the element

§Remarks

This is a convenience function that gets the mut ref of an element of the Vec.