client::networking

Function process_fragment_task

Source
pub fn process_fragment_task(
    task: FragmentTask,
    data: Vec<u8>,
    cli_args: &CliClientArgs,
) -> Result<TcpStream, FractalError>
Expand description

Process a FragmentTask by generating a fractal image and saving it to the filesystem.

§Arguments

  • task - A FragmentTask containing details such as the fractal type, resolution, and range.
  • data - A Vec<u8> containing the image data.
  • open_after_save - A boolean indicating whether the image should be opened after it is saved.

§Return

  • Result<(TcpStream), FractalError> - A TcpStream if the connection was successful, or a FractalError if the connection failed.