【发布时间】:2021-07-12 10:25:34
【问题描述】:
我想用墨水创建一个HashMap 存储项目!。
#[ink(storage)]
pub struct item {
shipment: ink_storage::collections::HashMap<
(AccountId, AccountId),
ink_storage::collections::Vec<u128>,
>,
}
并初始化它:
#[ink(constructor)]
pub fn new() -> Self {
Self {
shipment: ink_storage::collections::HashMap::new(),
}
}
我遇到了这个错误信息
特征
PackedLayout未实现 `ink_storage::Vec
【问题讨论】:
-
从他们的文档看来,这个 trait 是为
Vecfrom standard library 实现的