serialize_array_zero_copy

Function serialize_array_zero_copy 

Source
pub fn serialize_array_zero_copy<P, A, S>(
    path: P,
    array: &ArrayBase<S, IxDyn>,
    format: SerializationFormat,
) -> Result<()>
where P: AsRef<Path>, A: Serialize + Pod, S: Data<Elem = A>,
Expand description

Zero-copy serialization of contiguous arrays

This function provides efficient serialization of contiguous arrays without intermediate copying. It writes data directly from the array’s memory layout to the output file.

§Arguments

  • path - Path to the output file
  • array - Array to serialize (must be in standard layout)
  • format - Serialization format

§Returns

  • Result<()> - Success or error

§Note

This function requires the array to be in standard (C-contiguous) layout. For non-contiguous arrays, use the regular serialize_array function.