I am new to rust and I am looking to implement my hashmap in my struct like so
#[derive(Clone, Data)]
struct CheckState {
cool: String,
int_cool: i32,
hashmap_cool: HashMap<i32, String>
}
But i keep recieving the error code error[E0277]: the trait bound `HashMap<i32, std::string::String>: Data` is not satisfied and i do not understand why and the help is not much help
the rust help
help: the following other types implement trait `Data`:
&'static str
()
(T0, T1)
(T0, T1, T2)
(T0, T1, T2, T3)
(T0, T1, T2, T3, T4)
(T0, T1, T2, T3, T4, T5)
(T0,)
and 87 others
= note: this error originates in the derive macro `Data` (in Nightly builds, run with -Z macro-backtrace for more info)
please ignore variable names they are not the same in my code
#[derive(Data)]is not in the Rust's standard library. Which library are you using?