Hello,
I have a file where one dataset is stored as a VarLenArray of a custom compound which contains at least one VarLenArray. The following code does not work with the current version as the trait Copy is not implemented for VarLenArray
error[E0204]: the trait `Copy` may not be implemented for this type
--> src\main.rs:60:18
|
60 | #[derive(H5Type, Copy, Debug)] // register with HDF5
| ^^^^
...
63 | name: VarLenAscii,
| ----------------- this field does not implement `Copy`
...
67 | neighbours: VarLenArray<i32>,
| -------------------------- this field does not implement `Copy`
If I change VarLenArray to requiring Clone instead of Copy then I can get this to compile, run and read in the correct data, but I am unsure what effects that has on the code. What would be a good solution to this problem?
Hello, I have a file where one dataset is stored as a
VarLenArray
of a custom compound which contains at least oneVarLenArray
. The following code does not work with the current version as the traitCopy
is not implemented forVarLenArray
Results in the error:
If I change
VarLenArray
to requiringClone
instead ofCopy
then I can get this to compile, run and read in the correct data, but I am unsure what effects that has on the code. What would be a good solution to this problem?