Skip to main content

update_array_bytes

Function update_array_bytes 

Source
pub fn update_array_bytes<'a>(
    bytes: ArrayBytes<'_>,
    shape: &[u64],
    update_indexer: &dyn Indexer,
    update_bytes: &ArrayBytes<'_>,
    data_type_size: DataTypeSize,
) -> Result<ArrayBytes<'a>, CodecError>
Expand description

Update array bytes.

§Errors

Returns a CodecError if

  • bytes are not compatible with the shape and data_type_size,
  • update_bytes are not compatible with the update_indexer and data_type_size,
  • update_indexer is not within the bounds of shape

§Panics

Panics if the indexer references bytes beyond usize::MAX.