[英]How can I store data from two different cell arrays into one structure field in MATLAB
[英]How can I merge the fields from different HashMaps into one?
我有以下结构:
pub struct Resource {
name: String,
info: HashMap<String, i32>,
info_float: HashMap<String, f32>,
info_string: HashMap<String, String>,
}
有没有一种方法可以将3个具有单独值的HashMap
合并到单个HashMap
?
您可以使用元组:
pub struct Resource {
name: String,
info: HashMap<String, (i32, f32, String)>,
}
在操场上观看它的动作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.