Struct hubs::Chunk [−][src]
Expand description
A Chunk of Data.
A Chunk
contains an array of your desired datatype T
.
The variable used
has to be set to the amount of valid values in data
.
There must be no gaps in data
but it does not has to be fully used.
A chunk bust be comitted to be readable, see HubsWriteAccess.
If you did not manually clear the chunk content, there will be stale data in the chunk from the previous round.
This is ok, if you set the used
variable correcly.
Fields
capacity: usize
The capacity of this chunk, do not change
used: usize
Count of used elements in this chunk. Set this before you commit
data: Box<[T]>
The data in this chunk. Feel free to borrow the data to other functions, e.g. a network receive