pdeCallFfi function

WireSyncRust2DartSse? pdeCallFfi(
  1. GeneralizedFrbRustBinding generalizedFrbRustBinding,
  2. SseSerializer serializer, {
  3. required int funcId,
  4. NativePortType? port,
})

This is only intended to be used by automatically generated code, instead of developers.

Implementation

WireSyncRust2DartSse? pdeCallFfi(
  GeneralizedFrbRustBinding generalizedFrbRustBinding,
  SseSerializer serializer, {
  required int funcId,
  NativePortType? port,
}) {
  final raw = serializer.intoRaw();

  if (port != null) {
    generalizedFrbRustBinding.pdeFfiDispatcherPrimary(
      funcId: funcId,
      port: port,
      ptr: raw.ptr,
      rustVecLen: raw.rustVecLen,
      dataLen: raw.dataLen,
    );
    return null;
  } else {
    return generalizedFrbRustBinding.pdeFfiDispatcherSync(
      funcId: funcId,
      ptr: raw.ptr,
      rustVecLen: raw.rustVecLen,
      dataLen: raw.dataLen,
    );
  }
}