"Missing lifetime specifier" means that in the structure definition you did not say how long the link to the line slice is allowed to remain. For your code to be safe, it must adhere to at least as long as the structure.
You need to define the lifetime parameter in your structure and use it for the string fragment.
struct Excel<'a> { columns: HashMap<&'a str, Vec<f64>> }
This suggests that the string slice ( HashMap key) has some lifetime specified by the user of the Excel structure. Life times are one of the key features of Rust. You can learn more about life expectancy in the rust documentation .
It is usually easier to define the structure that owns the string. Then you can use String .
struct Excel { columns: HashMap<String, Vec<f64>> }
source share