encode_DartFn_Inputs__Output_unit method

Future<void> Function(int) encode_DartFn_Inputs__Output_unit(
  1. FutureOr<void> raw()
)

Implementation

Future<void> Function(
  int,
) encode_DartFn_Inputs__Output_unit(FutureOr<void> Function() raw) {
  return (
    callId,
  ) async {
    final rawOutput = await raw();

    final serializer = SseSerializer(generalizedFrbRustBinding);
    sse_encode_unit(rawOutput, serializer);
    final output = serializer.intoRaw();

    generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen);
  };
}