// This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.12.0.

// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field

import 'api.dart';
import 'dart:async';
import 'dart:convert';
import 'dart:ffi' as ffi;
import 'frb_generated.dart';
import 'lib.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart';

abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
  RustLibApiImplPlatform({
    required super.handler,
    required super.wire,
    required super.generalizedFrbRustBinding,
    required super.portManager,
  });

  @protected
  AnyhowException dco_decode_AnyhowException(dynamic raw);

  @protected
  RustStreamSink<BridgeEvent> dco_decode_StreamSink_bridge_event_Sse(
    dynamic raw,
  );

  @protected
  RustStreamSink<double> dco_decode_StreamSink_f_32_Sse(dynamic raw);

  @protected
  String dco_decode_String(dynamic raw);

  @protected
  bool dco_decode_bool(dynamic raw);

  @protected
  BridgeAudioProcessingConfig
  dco_decode_box_autoadd_bridge_audio_processing_config(dynamic raw);

  @protected
  BridgeBookmark dco_decode_box_autoadd_bridge_bookmark(dynamic raw);

  @protected
  BridgeMessageTarget dco_decode_box_autoadd_bridge_message_target(dynamic raw);

  @protected
  BridgeVoiceJoinErrorCode dco_decode_box_autoadd_bridge_voice_join_error_code(
    dynamic raw,
  );

  @protected
  double dco_decode_box_autoadd_f_32(dynamic raw);

  @protected
  int dco_decode_box_autoadd_i_32(dynamic raw);

  @protected
  PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw);

  @protected
  BigInt dco_decode_box_autoadd_u_64(dynamic raw);

  @protected
  BridgeAudioBackend dco_decode_bridge_audio_backend(dynamic raw);

  @protected
  BridgeAudioDevice dco_decode_bridge_audio_device(dynamic raw);

  @protected
  BridgeAudioDeviceList dco_decode_bridge_audio_device_list(dynamic raw);

  @protected
  BridgeAudioProcessingConfig dco_decode_bridge_audio_processing_config(
    dynamic raw,
  );

  @protected
  BridgeAudioProcessingStats dco_decode_bridge_audio_processing_stats(
    dynamic raw,
  );

  @protected
  BridgeAudioRoute dco_decode_bridge_audio_route(dynamic raw);

  @protected
  BridgeAudioStats dco_decode_bridge_audio_stats(dynamic raw);

  @protected
  BridgeBookmark dco_decode_bridge_bookmark(dynamic raw);

  @protected
  BridgeChannel dco_decode_bridge_channel(dynamic raw);

  @protected
  BridgeClient dco_decode_bridge_client(dynamic raw);

  @protected
  BridgeClientProfile dco_decode_bridge_client_profile(dynamic raw);

  @protected
  BridgeEffectOwner dco_decode_bridge_effect_owner(dynamic raw);

  @protected
  BridgeError dco_decode_bridge_error(dynamic raw);

  @protected
  BridgeEvent dco_decode_bridge_event(dynamic raw);

  @protected
  BridgeIosVoiceProcessingMode dco_decode_bridge_ios_voice_processing_mode(
    dynamic raw,
  );

  @protected
  BridgeMessageTarget dco_decode_bridge_message_target(dynamic raw);

  @protected
  BridgeNetworkState dco_decode_bridge_network_state(dynamic raw);

  @protected
  BridgePttBinding dco_decode_bridge_ptt_binding(dynamic raw);

  @protected
  BridgePttDescriptor dco_decode_bridge_ptt_descriptor(dynamic raw);

  @protected
  BridgePttInputClass dco_decode_bridge_ptt_input_class(dynamic raw);

  @protected
  BridgeSnapshot dco_decode_bridge_snapshot(dynamic raw);

  @protected
  BridgeTransmitMode dco_decode_bridge_transmit_mode(dynamic raw);

  @protected
  BridgeVadBackend dco_decode_bridge_vad_backend(dynamic raw);

  @protected
  BridgeVoiceJoinErrorCode dco_decode_bridge_voice_join_error_code(dynamic raw);

  @protected
  BridgeVoiceJoinSyncState dco_decode_bridge_voice_join_sync_state(dynamic raw);

  @protected
  double dco_decode_f_32(dynamic raw);

  @protected
  int dco_decode_i_32(dynamic raw);

  @protected
  PlatformInt64 dco_decode_i_64(dynamic raw);

  @protected
  List<String> dco_decode_list_String(dynamic raw);

  @protected
  List<BridgeAudioDevice> dco_decode_list_bridge_audio_device(dynamic raw);

  @protected
  List<BridgeBookmark> dco_decode_list_bridge_bookmark(dynamic raw);

  @protected
  List<BridgeChannel> dco_decode_list_bridge_channel(dynamic raw);

  @protected
  List<BridgeClient> dco_decode_list_bridge_client(dynamic raw);

  @protected
  Uint8List dco_decode_list_prim_u_8_strict(dynamic raw);

  @protected
  String? dco_decode_opt_String(dynamic raw);

  @protected
  BridgeVoiceJoinErrorCode?
  dco_decode_opt_box_autoadd_bridge_voice_join_error_code(dynamic raw);

  @protected
  double? dco_decode_opt_box_autoadd_f_32(dynamic raw);

  @protected
  int? dco_decode_opt_box_autoadd_i_32(dynamic raw);

  @protected
  PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw);

  @protected
  BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw);

  @protected
  PermissionStateKind dco_decode_permission_state_kind(dynamic raw);

  @protected
  int dco_decode_u_32(dynamic raw);

  @protected
  BigInt dco_decode_u_64(dynamic raw);

  @protected
  int dco_decode_u_8(dynamic raw);

  @protected
  void dco_decode_unit(dynamic raw);

  @protected
  AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer);

  @protected
  RustStreamSink<BridgeEvent> sse_decode_StreamSink_bridge_event_Sse(
    SseDeserializer deserializer,
  );

  @protected
  RustStreamSink<double> sse_decode_StreamSink_f_32_Sse(
    SseDeserializer deserializer,
  );

  @protected
  String sse_decode_String(SseDeserializer deserializer);

  @protected
  bool sse_decode_bool(SseDeserializer deserializer);

  @protected
  BridgeAudioProcessingConfig
  sse_decode_box_autoadd_bridge_audio_processing_config(
    SseDeserializer deserializer,
  );

  @protected
  BridgeBookmark sse_decode_box_autoadd_bridge_bookmark(
    SseDeserializer deserializer,
  );

  @protected
  BridgeMessageTarget sse_decode_box_autoadd_bridge_message_target(
    SseDeserializer deserializer,
  );

  @protected
  BridgeVoiceJoinErrorCode sse_decode_box_autoadd_bridge_voice_join_error_code(
    SseDeserializer deserializer,
  );

  @protected
  double sse_decode_box_autoadd_f_32(SseDeserializer deserializer);

  @protected
  int sse_decode_box_autoadd_i_32(SseDeserializer deserializer);

  @protected
  PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer);

  @protected
  BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer);

  @protected
  BridgeAudioBackend sse_decode_bridge_audio_backend(
    SseDeserializer deserializer,
  );

  @protected
  BridgeAudioDevice sse_decode_bridge_audio_device(
    SseDeserializer deserializer,
  );

  @protected
  BridgeAudioDeviceList sse_decode_bridge_audio_device_list(
    SseDeserializer deserializer,
  );

  @protected
  BridgeAudioProcessingConfig sse_decode_bridge_audio_processing_config(
    SseDeserializer deserializer,
  );

  @protected
  BridgeAudioProcessingStats sse_decode_bridge_audio_processing_stats(
    SseDeserializer deserializer,
  );

  @protected
  BridgeAudioRoute sse_decode_bridge_audio_route(SseDeserializer deserializer);

  @protected
  BridgeAudioStats sse_decode_bridge_audio_stats(SseDeserializer deserializer);

  @protected
  BridgeBookmark sse_decode_bridge_bookmark(SseDeserializer deserializer);

  @protected
  BridgeChannel sse_decode_bridge_channel(SseDeserializer deserializer);

  @protected
  BridgeClient sse_decode_bridge_client(SseDeserializer deserializer);

  @protected
  BridgeClientProfile sse_decode_bridge_client_profile(
    SseDeserializer deserializer,
  );

  @protected
  BridgeEffectOwner sse_decode_bridge_effect_owner(
    SseDeserializer deserializer,
  );

  @protected
  BridgeError sse_decode_bridge_error(SseDeserializer deserializer);

  @protected
  BridgeEvent sse_decode_bridge_event(SseDeserializer deserializer);

  @protected
  BridgeIosVoiceProcessingMode sse_decode_bridge_ios_voice_processing_mode(
    SseDeserializer deserializer,
  );

  @protected
  BridgeMessageTarget sse_decode_bridge_message_target(
    SseDeserializer deserializer,
  );

  @protected
  BridgeNetworkState sse_decode_bridge_network_state(
    SseDeserializer deserializer,
  );

  @protected
  BridgePttBinding sse_decode_bridge_ptt_binding(SseDeserializer deserializer);

  @protected
  BridgePttDescriptor sse_decode_bridge_ptt_descriptor(
    SseDeserializer deserializer,
  );

  @protected
  BridgePttInputClass sse_decode_bridge_ptt_input_class(
    SseDeserializer deserializer,
  );

  @protected
  BridgeSnapshot sse_decode_bridge_snapshot(SseDeserializer deserializer);

  @protected
  BridgeTransmitMode sse_decode_bridge_transmit_mode(
    SseDeserializer deserializer,
  );

  @protected
  BridgeVadBackend sse_decode_bridge_vad_backend(SseDeserializer deserializer);

  @protected
  BridgeVoiceJoinErrorCode sse_decode_bridge_voice_join_error_code(
    SseDeserializer deserializer,
  );

  @protected
  BridgeVoiceJoinSyncState sse_decode_bridge_voice_join_sync_state(
    SseDeserializer deserializer,
  );

  @protected
  double sse_decode_f_32(SseDeserializer deserializer);

  @protected
  int sse_decode_i_32(SseDeserializer deserializer);

  @protected
  PlatformInt64 sse_decode_i_64(SseDeserializer deserializer);

  @protected
  List<String> sse_decode_list_String(SseDeserializer deserializer);

  @protected
  List<BridgeAudioDevice> sse_decode_list_bridge_audio_device(
    SseDeserializer deserializer,
  );

  @protected
  List<BridgeBookmark> sse_decode_list_bridge_bookmark(
    SseDeserializer deserializer,
  );

  @protected
  List<BridgeChannel> sse_decode_list_bridge_channel(
    SseDeserializer deserializer,
  );

  @protected
  List<BridgeClient> sse_decode_list_bridge_client(
    SseDeserializer deserializer,
  );

  @protected
  Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer);

  @protected
  String? sse_decode_opt_String(SseDeserializer deserializer);

  @protected
  BridgeVoiceJoinErrorCode?
  sse_decode_opt_box_autoadd_bridge_voice_join_error_code(
    SseDeserializer deserializer,
  );

  @protected
  double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer);

  @protected
  int? sse_decode_opt_box_autoadd_i_32(SseDeserializer deserializer);

  @protected
  PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer);

  @protected
  BigInt? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer);

  @protected
  PermissionStateKind sse_decode_permission_state_kind(
    SseDeserializer deserializer,
  );

  @protected
  int sse_decode_u_32(SseDeserializer deserializer);

  @protected
  BigInt sse_decode_u_64(SseDeserializer deserializer);

  @protected
  int sse_decode_u_8(SseDeserializer deserializer);

  @protected
  void sse_decode_unit(SseDeserializer deserializer);

  @protected
  void sse_encode_AnyhowException(
    AnyhowException self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_StreamSink_bridge_event_Sse(
    RustStreamSink<BridgeEvent> self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_StreamSink_f_32_Sse(
    RustStreamSink<double> self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_String(String self, SseSerializer serializer);

  @protected
  void sse_encode_bool(bool self, SseSerializer serializer);

  @protected
  void sse_encode_box_autoadd_bridge_audio_processing_config(
    BridgeAudioProcessingConfig self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_box_autoadd_bridge_bookmark(
    BridgeBookmark self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_box_autoadd_bridge_message_target(
    BridgeMessageTarget self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_box_autoadd_bridge_voice_join_error_code(
    BridgeVoiceJoinErrorCode self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_box_autoadd_f_32(double self, SseSerializer serializer);

  @protected
  void sse_encode_box_autoadd_i_32(int self, SseSerializer serializer);

  @protected
  void sse_encode_box_autoadd_i_64(
    PlatformInt64 self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer);

  @protected
  void sse_encode_bridge_audio_backend(
    BridgeAudioBackend self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_audio_device(
    BridgeAudioDevice self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_audio_device_list(
    BridgeAudioDeviceList self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_audio_processing_config(
    BridgeAudioProcessingConfig self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_audio_processing_stats(
    BridgeAudioProcessingStats self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_audio_route(
    BridgeAudioRoute self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_audio_stats(
    BridgeAudioStats self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_bookmark(
    BridgeBookmark self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_channel(BridgeChannel self, SseSerializer serializer);

  @protected
  void sse_encode_bridge_client(BridgeClient self, SseSerializer serializer);

  @protected
  void sse_encode_bridge_client_profile(
    BridgeClientProfile self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_effect_owner(
    BridgeEffectOwner self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_error(BridgeError self, SseSerializer serializer);

  @protected
  void sse_encode_bridge_event(BridgeEvent self, SseSerializer serializer);

  @protected
  void sse_encode_bridge_ios_voice_processing_mode(
    BridgeIosVoiceProcessingMode self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_message_target(
    BridgeMessageTarget self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_network_state(
    BridgeNetworkState self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_ptt_binding(
    BridgePttBinding self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_ptt_descriptor(
    BridgePttDescriptor self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_ptt_input_class(
    BridgePttInputClass self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_snapshot(
    BridgeSnapshot self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_transmit_mode(
    BridgeTransmitMode self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_vad_backend(
    BridgeVadBackend self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_voice_join_error_code(
    BridgeVoiceJoinErrorCode self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_bridge_voice_join_sync_state(
    BridgeVoiceJoinSyncState self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_f_32(double self, SseSerializer serializer);

  @protected
  void sse_encode_i_32(int self, SseSerializer serializer);

  @protected
  void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer);

  @protected
  void sse_encode_list_String(List<String> self, SseSerializer serializer);

  @protected
  void sse_encode_list_bridge_audio_device(
    List<BridgeAudioDevice> self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_list_bridge_bookmark(
    List<BridgeBookmark> self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_list_bridge_channel(
    List<BridgeChannel> self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_list_bridge_client(
    List<BridgeClient> self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_list_prim_u_8_strict(
    Uint8List self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_opt_String(String? self, SseSerializer serializer);

  @protected
  void sse_encode_opt_box_autoadd_bridge_voice_join_error_code(
    BridgeVoiceJoinErrorCode? self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_opt_box_autoadd_f_32(double? self, SseSerializer serializer);

  @protected
  void sse_encode_opt_box_autoadd_i_32(int? self, SseSerializer serializer);

  @protected
  void sse_encode_opt_box_autoadd_i_64(
    PlatformInt64? self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_opt_box_autoadd_u_64(BigInt? self, SseSerializer serializer);

  @protected
  void sse_encode_permission_state_kind(
    PermissionStateKind self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_u_32(int self, SseSerializer serializer);

  @protected
  void sse_encode_u_64(BigInt self, SseSerializer serializer);

  @protected
  void sse_encode_u_8(int self, SseSerializer serializer);

  @protected
  void sse_encode_unit(void self, SseSerializer serializer);
}

// Section: wire_class

class RustLibWire implements BaseWire {
  factory RustLibWire.fromExternalLibrary(ExternalLibrary lib) =>
      RustLibWire(lib.ffiDynamicLibrary);

  /// Holds the symbol lookup function.
  final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
  _lookup;

  /// The symbols are looked up in [dynamicLibrary].
  RustLibWire(ffi.DynamicLibrary dynamicLibrary)
    : _lookup = dynamicLibrary.lookup;
}
