insert element in vector rust code example Example: push and item to vector rust let mut vec = vec![10]; vec.push(100); assert_eq!(vec[1], 100);