盒子和数组是可复制的,为什么这不能编译?
#[derive(Debug, Copy, Clone)]
enum Octree{
Branch(Box<[Octree; 8]>),
Filled,
Empty,
}
Run Code Online (Sandbox Code Playgroud)
编译错误:
main.rs:3:17: 3:21 error: the trait `Copy` may not be implemented for this type; variant `Branch` does not implement `Copy` [E0205]
Run Code Online (Sandbox Code Playgroud)
编辑:好的,所以我不想Octree复制.但是我如何让它变得可变?我希望能够更改节点的子节点.
| 归档时间: |
|
| 查看次数: |
402 次 |
| 最近记录: |