Why isn't the enum containing the mailbox copied?
Boxes and arrays can be copied, so why doesn't this compile?
#[derive(Debug, Copy, Clone)]
enum Octree{
Branch(Box<[Octree; 8]>),
Filled,
Empty,
}
Compilation error:
main.rs:3:17: 3:21 error: the trait `Copy` may not be implemented for this type; variant `Branch` does not implement `Copy` [E0205]
EDIT: Ok, so I don't want to Octree
be copyable. But how can I make it mutable? I want to be able to modify the children of a node.
+3
source to share