Function mapSinkFailure

Map a transport sink failure without hiding the bytes already accepted.

ImageWriteResult mapSinkFailure(
  ulong bytesWritten,
  transport.source.WriteError error
) pure nothrow @nogc @safe;