pub trait AddressedChunkArrayTrait {
// Required methods
fn get_addressed_chunk_array_size(&self) -> u128;
fn get_data_chunk(&self, data_zone: u128, data_chunk: u128) -> CandyShared;
fn flatten(self) -> Vec<u8> ⓘ;
}
Expand description
A trait for operations on AddressedChunkArray
, which is a vector of AddressedChunk
instances representing a contiguous sequence of chunks of data.
Required Methods§
Sourcefn get_addressed_chunk_array_size(&self) -> u128
fn get_addressed_chunk_array_size(&self) -> u128
Get the total size of the AddressedChunkArray
.
Sourcefn get_data_chunk(&self, data_zone: u128, data_chunk: u128) -> CandyShared
fn get_data_chunk(&self, data_zone: u128, data_chunk: u128) -> CandyShared
Get the data chunk from the specified DataZone
and DataChunk
.
§Arguments
data_zone
- The index of theDataZone
containing the desired data chunk.data_chunk
- The index of the desired data chunk within the specifiedDataZone
.
§Returns
The CandyShared
instance representing the desired data chunk, or a CandyShared::Option(None)
instance if the data chunk is not found.