我正在使用结构的结构如下:
GC{
v: "1.0.0",
e: "xx",
d: "xx/xx/xx",
gc: [S{
S: [A{
n: [N {
v: "S"
}
],
f: [M{
v: "P"
}
]
... }
我想计算字段 A 并且我使用了 field_count()。 如果我尝试写:
let fileconf_vec_S = fileconf.gc;
let fileconf_s = &fileconf_vec_S[0];
println!("{:?}", fileconf_s::field_count);
它返回我“无法解决:使用未声明的板条箱或模块
fileconf_s
使用未声明的板条箱或模块fileconf_s
rustcClick for full compiler diagnostic"
我怎样才能扩展 S 结构的特征?