基板开发人员可能会遇到一个常见问题:开发自定义托盘以将映射存储到具有常见类型的存储中,例如String
. 举个例子:
#[derive(Encode, Decode, Clone, Default, RuntimeDebug)]
pub struct ClusterMetadata {
ip_address: String,
namespace: String,
whitelisted_ips: String,
}
在构建运行时,您会收到以下错误String
:
|
21 | ip_address: String,
| ^^^^^^ not found in this scope