fn send_fragment_result(
fragment_task: &FragmentTask,
cli_args: &CliClientArgs,
pixel_data: PixelData,
data: Vec<u8>,
) -> Result<TcpStream, FractalError>Expand description
Send a FragmentResult to the server after generating a fractal image.
§Arguments
img- AnImageBuffercontaining the fractal image.fragment_task- AFragmentTaskcontaining details such as the fractal type, resolution, and range.cli_args- ACliClientArgscontaining the command line arguments.pixel_data- APixelDatastruct containing the image data.data- AVec<u8>containing the image data.
§Return
Result<(), FractalError>- Anio::Errorif the image could not be saved.
§Details
This function converts the ImageBuffer to a Vec<u8> and then to a PixelData struct.