Help with Types in Rustler NIF

Hi! I have recently started using rustler with elixir and it has been great. I am having a couple issues with passing types between elixir and rustler?

Basically, a value I have in elixir is a List of Maps, and I would like to pass it to rustler (I defined this as a Vec, where the Struct is a custom struct of the same format as the map. I have attached a code segment below

Elixir

Example Data: 
[
 %{
   date: "2020-01-01" (string)
   value: 10.0 (float)
 }
]

Rust

let data: Vec<ValueData> = from_term(args[0])?;

#[derive(Debug, NifMap)]
pub struct PriceData {
    pub date: String,
    pub open: f64,
    pub high: f64,
    pub low: f64,
    pub close: f64,
    pub volume: f64
}

But am getting a compilation error that NifStruct does not exist in package rustler::atoms. Any help would be much appreciated

Dependencies (RUST)

rustler = "0.21.1"

Dependencies (ELIXIR)

{:rustler, "~> 0.21.1"},
1 Like