I want to create a data type using Struct inside a Parity Substrate custom runtime. The data type is intended to be generic so that I can use it over different types.
I am trying the following, but it's not compiling. The compiler complains about sub-types not found for T.
pub struct CustomDataType<T> {
data: Vec<u8>,
balance: T::Balance,
owner: T::AccountId,
}
I should be able to compile a generic struct.
BalanceandAccountIdcame from, unless you apply a trait bound onTthat provides them. Next time, please see what makes a proper minimal reproducible example, and don't forget to include relevant crates and modules. - E_net4 the curator