问题描述
struct Foo {
bar: i32,}
let foo_var = Foo { bar: 16 };
// I want to do something like this
foo_var.new_field: u8 = "new field".to_string();
// which lets me then call
println!("{}",foo_var.new_field);
// which would print "new field"
我知道我可以做到:
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)