I'd like to know if it is possible to destruct a field of a struct with Vec
type. For example:
struct Node {
pub v: i32,
pub children: Vec<Node>,
}
let tree = Node {
v: 1,
children: vec![Node { v: 2, children: vec![] }],
};
// Is it possible to do this?
match tree {
Node {
v,
children: vec![a @ Node {..}]
}
}