diffuse
diffuse copied to clipboard
Add a way to describe cut / copy / paste in a data structure
There are 2 distinct types of intended operation:
- Moving data from a place to another.
- Copying the data from a place to another.
Moving pieces of data
One use case for representing the moving operation is that the resources associated with a specific part of the data can follow the move and avoid de-allocation / re-allocation.
Copying pieces of data
The use case is when we want to keep track of the origin of a piece of data. As a new data, it would probably have its own associated resources allocated.
Ideally, the scope of moving / copying should be the whole data structure and not just inside a vector or hashmap.