// 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

// Static analysis wrongly picks the IO variant, thus ignore this
// ignore_for_file: argument_type_not_assignable

import 'bridge.dart';
import 'bridge/callbacks.dart';
import 'bridge/callbacks/user_discovery.dart';
import 'bridge/wrapper.dart';
import 'bridge/wrapper/backup.dart';
import 'bridge/wrapper/key_manager.dart';
import 'bridge/wrapper/signal.dart';
import 'bridge/wrapper/user_discovery.dart';
import 'dart:async';
import 'dart:convert';
import 'frb_generated.dart';
import 'keys/backup_password_keys.dart';
import 'lib.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_web.dart';
import 'signal/engine.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
  FutureOr<RustStreamSink<String>> Function()
  dco_decode_DartFn_Inputs__Output_StreamSink_String_Sse_AnyhowException(
    dynamic raw,
  );

  @protected
  FutureOr<AnnouncedUser?> Function(PlatformInt64)
  dco_decode_DartFn_Inputs_i_64_Output_opt_box_autoadd_announced_user_AnyhowException(
    dynamic raw,
  );

  @protected
  FutureOr<List<Uint8List>?> Function(PlatformInt64)
  dco_decode_DartFn_Inputs_i_64_Output_opt_list_list_prim_u_8_strict_AnyhowException(
    dynamic raw,
  );

  @protected
  FutureOr<List<OtherPromotion>?> Function(PlatformInt64)
  dco_decode_DartFn_Inputs_i_64_Output_opt_list_other_promotion_AnyhowException(
    dynamic raw,
  );

  @protected
  FutureOr<Uint8List?> Function(PlatformInt64)
  dco_decode_DartFn_Inputs_i_64_Output_opt_list_prim_u_8_strict_AnyhowException(
    dynamic raw,
  );

  @protected
  FutureOr<bool> Function(PlatformInt64, AnnouncedUser, PlatformInt64?)
  dco_decode_DartFn_Inputs_i_64_announced_user_opt_box_autoadd_i_64_Output_bool_AnyhowException(
    dynamic raw,
  );

  @protected
  FutureOr<bool> Function(PlatformInt64, PlatformInt64, Uint8List)
  dco_decode_DartFn_Inputs_i_64_i_64_list_prim_u_8_strict_Output_bool_AnyhowException(
    dynamic raw,
  );

  @protected
  FutureOr<bool> Function(PlatformInt64, Uint8List)
  dco_decode_DartFn_Inputs_i_64_list_prim_u_8_strict_Output_bool_AnyhowException(
    dynamic raw,
  );

  @protected
  FutureOr<bool> Function(List<Uint8List>)
  dco_decode_DartFn_Inputs_list_list_prim_u_8_strict_Output_bool_AnyhowException(
    dynamic raw,
  );

  @protected
  FutureOr<Uint8List?> Function(Uint8List)
  dco_decode_DartFn_Inputs_list_prim_u_8_strict_Output_opt_list_prim_u_8_strict_AnyhowException(
    dynamic raw,
  );

  @protected
  FutureOr<bool> Function(Uint8List, Uint8List, Uint8List)
  dco_decode_DartFn_Inputs_list_prim_u_8_strict_list_prim_u_8_strict_list_prim_u_8_strict_Output_bool_AnyhowException(
    dynamic raw,
  );

  @protected
  FutureOr<bool> Function(OtherPromotion)
  dco_decode_DartFn_Inputs_other_promotion_Output_bool_AnyhowException(
    dynamic raw,
  );

  @protected
  Object dco_decode_DartOpaque(dynamic raw);

  @protected
  Map<PlatformInt64, Uint8List> dco_decode_Map_i_64_list_prim_u_8_strict_None(
    dynamic raw,
  );

  @protected
  RustStreamSink<String> dco_decode_StreamSink_String_Sse(dynamic raw);

  @protected
  String dco_decode_String(dynamic raw);

  @protected
  AnnouncedUser dco_decode_announced_user(dynamic raw);

  @protected
  BackupPasswordKeys dco_decode_backup_password_keys(dynamic raw);

  @protected
  bool dco_decode_bool(dynamic raw);

  @protected
  AnnouncedUser dco_decode_box_autoadd_announced_user(dynamic raw);

  @protected
  BackupPasswordKeys dco_decode_box_autoadd_backup_password_keys(dynamic raw);

  @protected
  FrbPreKeyBundle dco_decode_box_autoadd_frb_pre_key_bundle(dynamic raw);

  @protected
  PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw);

  @protected
  InitConfig dco_decode_box_autoadd_init_config(dynamic raw);

  @protected
  OtherPromotion dco_decode_box_autoadd_other_promotion(dynamic raw);

  @protected
  int dco_decode_box_autoadd_u_32(dynamic raw);

  @protected
  UserDiscoveryStoreFlutter dco_decode_box_autoadd_user_discovery_store_flutter(
    dynamic raw,
  );

  @protected
  UserDiscoveryUtilsFlutter dco_decode_box_autoadd_user_discovery_utils_flutter(
    dynamic raw,
  );

  @protected
  FlutterUserDiscovery dco_decode_flutter_user_discovery(dynamic raw);

  @protected
  FrbPqcPreKey dco_decode_frb_pqc_pre_key(dynamic raw);

  @protected
  FrbPreKeyBundle dco_decode_frb_pre_key_bundle(dynamic raw);

  @protected
  PlatformInt64 dco_decode_i_64(dynamic raw);

  @protected
  InitConfig dco_decode_init_config(dynamic raw);

  @protected
  PlatformInt64 dco_decode_isize(dynamic raw);

  @protected
  List<FrbPqcPreKey> dco_decode_list_frb_pqc_pre_key(dynamic raw);

  @protected
  List<Uint8List> dco_decode_list_list_prim_u_8_strict(dynamic raw);

  @protected
  List<OtherPromotion> dco_decode_list_other_promotion(dynamic raw);

  @protected
  List<int> dco_decode_list_prim_u_8_loose(dynamic raw);

  @protected
  Uint8List dco_decode_list_prim_u_8_strict(dynamic raw);

  @protected
  List<(PlatformInt64, Uint8List)>
  dco_decode_list_record_i_64_list_prim_u_8_strict(dynamic raw);

  @protected
  String? dco_decode_opt_String(dynamic raw);

  @protected
  AnnouncedUser? dco_decode_opt_box_autoadd_announced_user(dynamic raw);

  @protected
  PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw);

  @protected
  int? dco_decode_opt_box_autoadd_u_32(dynamic raw);

  @protected
  List<Uint8List>? dco_decode_opt_list_list_prim_u_8_strict(dynamic raw);

  @protected
  List<OtherPromotion>? dco_decode_opt_list_other_promotion(dynamic raw);

  @protected
  Uint8List? dco_decode_opt_list_prim_u_8_strict(dynamic raw);

  @protected
  OtherPromotion dco_decode_other_promotion(dynamic raw);

  @protected
  (PlatformInt64, Uint8List) dco_decode_record_i_64_list_prim_u_8_strict(
    dynamic raw,
  );

  @protected
  (Uint8List, PlatformInt64) dco_decode_record_list_prim_u_8_strict_i_64(
    dynamic raw,
  );

  @protected
  (String, String) dco_decode_record_string_string(dynamic raw);

  @protected
  RustBackupArchive dco_decode_rust_backup_archive(dynamic raw);

  @protected
  RustBackupIdentity dco_decode_rust_backup_identity(dynamic raw);

  @protected
  RustKeyManager dco_decode_rust_key_manager(dynamic raw);

  @protected
  RustSignal dco_decode_rust_signal(dynamic raw);

  @protected
  RustUtils dco_decode_rust_utils(dynamic raw);

  @protected
  int dco_decode_u_32(dynamic raw);

  @protected
  int dco_decode_u_8(dynamic raw);

  @protected
  U8Array32 dco_decode_u_8_array_32(dynamic raw);

  @protected
  void dco_decode_unit(dynamic raw);

  @protected
  UserDiscoveryStoreFlutter dco_decode_user_discovery_store_flutter(
    dynamic raw,
  );

  @protected
  UserDiscoveryUtilsFlutter dco_decode_user_discovery_utils_flutter(
    dynamic raw,
  );

  @protected
  BigInt dco_decode_usize(dynamic raw);

  @protected
  AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer);

  @protected
  Object sse_decode_DartOpaque(SseDeserializer deserializer);

  @protected
  Map<PlatformInt64, Uint8List> sse_decode_Map_i_64_list_prim_u_8_strict_None(
    SseDeserializer deserializer,
  );

  @protected
  RustStreamSink<String> sse_decode_StreamSink_String_Sse(
    SseDeserializer deserializer,
  );

  @protected
  String sse_decode_String(SseDeserializer deserializer);

  @protected
  AnnouncedUser sse_decode_announced_user(SseDeserializer deserializer);

  @protected
  BackupPasswordKeys sse_decode_backup_password_keys(
    SseDeserializer deserializer,
  );

  @protected
  bool sse_decode_bool(SseDeserializer deserializer);

  @protected
  AnnouncedUser sse_decode_box_autoadd_announced_user(
    SseDeserializer deserializer,
  );

  @protected
  BackupPasswordKeys sse_decode_box_autoadd_backup_password_keys(
    SseDeserializer deserializer,
  );

  @protected
  FrbPreKeyBundle sse_decode_box_autoadd_frb_pre_key_bundle(
    SseDeserializer deserializer,
  );

  @protected
  PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer);

  @protected
  InitConfig sse_decode_box_autoadd_init_config(SseDeserializer deserializer);

  @protected
  OtherPromotion sse_decode_box_autoadd_other_promotion(
    SseDeserializer deserializer,
  );

  @protected
  int sse_decode_box_autoadd_u_32(SseDeserializer deserializer);

  @protected
  UserDiscoveryStoreFlutter sse_decode_box_autoadd_user_discovery_store_flutter(
    SseDeserializer deserializer,
  );

  @protected
  UserDiscoveryUtilsFlutter sse_decode_box_autoadd_user_discovery_utils_flutter(
    SseDeserializer deserializer,
  );

  @protected
  FlutterUserDiscovery sse_decode_flutter_user_discovery(
    SseDeserializer deserializer,
  );

  @protected
  FrbPqcPreKey sse_decode_frb_pqc_pre_key(SseDeserializer deserializer);

  @protected
  FrbPreKeyBundle sse_decode_frb_pre_key_bundle(SseDeserializer deserializer);

  @protected
  PlatformInt64 sse_decode_i_64(SseDeserializer deserializer);

  @protected
  InitConfig sse_decode_init_config(SseDeserializer deserializer);

  @protected
  PlatformInt64 sse_decode_isize(SseDeserializer deserializer);

  @protected
  List<FrbPqcPreKey> sse_decode_list_frb_pqc_pre_key(
    SseDeserializer deserializer,
  );

  @protected
  List<Uint8List> sse_decode_list_list_prim_u_8_strict(
    SseDeserializer deserializer,
  );

  @protected
  List<OtherPromotion> sse_decode_list_other_promotion(
    SseDeserializer deserializer,
  );

  @protected
  List<int> sse_decode_list_prim_u_8_loose(SseDeserializer deserializer);

  @protected
  Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer);

  @protected
  List<(PlatformInt64, Uint8List)>
  sse_decode_list_record_i_64_list_prim_u_8_strict(
    SseDeserializer deserializer,
  );

  @protected
  String? sse_decode_opt_String(SseDeserializer deserializer);

  @protected
  AnnouncedUser? sse_decode_opt_box_autoadd_announced_user(
    SseDeserializer deserializer,
  );

  @protected
  PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer);

  @protected
  int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer);

  @protected
  List<Uint8List>? sse_decode_opt_list_list_prim_u_8_strict(
    SseDeserializer deserializer,
  );

  @protected
  List<OtherPromotion>? sse_decode_opt_list_other_promotion(
    SseDeserializer deserializer,
  );

  @protected
  Uint8List? sse_decode_opt_list_prim_u_8_strict(SseDeserializer deserializer);

  @protected
  OtherPromotion sse_decode_other_promotion(SseDeserializer deserializer);

  @protected
  (PlatformInt64, Uint8List) sse_decode_record_i_64_list_prim_u_8_strict(
    SseDeserializer deserializer,
  );

  @protected
  (Uint8List, PlatformInt64) sse_decode_record_list_prim_u_8_strict_i_64(
    SseDeserializer deserializer,
  );

  @protected
  (String, String) sse_decode_record_string_string(
    SseDeserializer deserializer,
  );

  @protected
  RustBackupArchive sse_decode_rust_backup_archive(
    SseDeserializer deserializer,
  );

  @protected
  RustBackupIdentity sse_decode_rust_backup_identity(
    SseDeserializer deserializer,
  );

  @protected
  RustKeyManager sse_decode_rust_key_manager(SseDeserializer deserializer);

  @protected
  RustSignal sse_decode_rust_signal(SseDeserializer deserializer);

  @protected
  RustUtils sse_decode_rust_utils(SseDeserializer deserializer);

  @protected
  int sse_decode_u_32(SseDeserializer deserializer);

  @protected
  int sse_decode_u_8(SseDeserializer deserializer);

  @protected
  U8Array32 sse_decode_u_8_array_32(SseDeserializer deserializer);

  @protected
  void sse_decode_unit(SseDeserializer deserializer);

  @protected
  UserDiscoveryStoreFlutter sse_decode_user_discovery_store_flutter(
    SseDeserializer deserializer,
  );

  @protected
  UserDiscoveryUtilsFlutter sse_decode_user_discovery_utils_flutter(
    SseDeserializer deserializer,
  );

  @protected
  BigInt sse_decode_usize(SseDeserializer deserializer);

  @protected
  int sse_decode_i_32(SseDeserializer deserializer);

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

  @protected
  void sse_encode_DartFn_Inputs__Output_StreamSink_String_Sse_AnyhowException(
    FutureOr<RustStreamSink<String>> Function() self,
    SseSerializer serializer,
  );

  @protected
  void
  sse_encode_DartFn_Inputs_i_64_Output_opt_box_autoadd_announced_user_AnyhowException(
    FutureOr<AnnouncedUser?> Function(PlatformInt64) self,
    SseSerializer serializer,
  );

  @protected
  void
  sse_encode_DartFn_Inputs_i_64_Output_opt_list_list_prim_u_8_strict_AnyhowException(
    FutureOr<List<Uint8List>?> Function(PlatformInt64) self,
    SseSerializer serializer,
  );

  @protected
  void
  sse_encode_DartFn_Inputs_i_64_Output_opt_list_other_promotion_AnyhowException(
    FutureOr<List<OtherPromotion>?> Function(PlatformInt64) self,
    SseSerializer serializer,
  );

  @protected
  void
  sse_encode_DartFn_Inputs_i_64_Output_opt_list_prim_u_8_strict_AnyhowException(
    FutureOr<Uint8List?> Function(PlatformInt64) self,
    SseSerializer serializer,
  );

  @protected
  void
  sse_encode_DartFn_Inputs_i_64_announced_user_opt_box_autoadd_i_64_Output_bool_AnyhowException(
    FutureOr<bool> Function(PlatformInt64, AnnouncedUser, PlatformInt64?) self,
    SseSerializer serializer,
  );

  @protected
  void
  sse_encode_DartFn_Inputs_i_64_i_64_list_prim_u_8_strict_Output_bool_AnyhowException(
    FutureOr<bool> Function(PlatformInt64, PlatformInt64, Uint8List) self,
    SseSerializer serializer,
  );

  @protected
  void
  sse_encode_DartFn_Inputs_i_64_list_prim_u_8_strict_Output_bool_AnyhowException(
    FutureOr<bool> Function(PlatformInt64, Uint8List) self,
    SseSerializer serializer,
  );

  @protected
  void
  sse_encode_DartFn_Inputs_list_list_prim_u_8_strict_Output_bool_AnyhowException(
    FutureOr<bool> Function(List<Uint8List>) self,
    SseSerializer serializer,
  );

  @protected
  void
  sse_encode_DartFn_Inputs_list_prim_u_8_strict_Output_opt_list_prim_u_8_strict_AnyhowException(
    FutureOr<Uint8List?> Function(Uint8List) self,
    SseSerializer serializer,
  );

  @protected
  void
  sse_encode_DartFn_Inputs_list_prim_u_8_strict_list_prim_u_8_strict_list_prim_u_8_strict_Output_bool_AnyhowException(
    FutureOr<bool> Function(Uint8List, Uint8List, Uint8List) self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_DartFn_Inputs_other_promotion_Output_bool_AnyhowException(
    FutureOr<bool> Function(OtherPromotion) self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_DartOpaque(Object self, SseSerializer serializer);

  @protected
  void sse_encode_Map_i_64_list_prim_u_8_strict_None(
    Map<PlatformInt64, Uint8List> self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_StreamSink_String_Sse(
    RustStreamSink<String> self,
    SseSerializer serializer,
  );

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

  @protected
  void sse_encode_announced_user(AnnouncedUser self, SseSerializer serializer);

  @protected
  void sse_encode_backup_password_keys(
    BackupPasswordKeys self,
    SseSerializer serializer,
  );

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

  @protected
  void sse_encode_box_autoadd_announced_user(
    AnnouncedUser self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_box_autoadd_backup_password_keys(
    BackupPasswordKeys self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_box_autoadd_frb_pre_key_bundle(
    FrbPreKeyBundle self,
    SseSerializer serializer,
  );

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

  @protected
  void sse_encode_box_autoadd_init_config(
    InitConfig self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_box_autoadd_other_promotion(
    OtherPromotion self,
    SseSerializer serializer,
  );

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

  @protected
  void sse_encode_box_autoadd_user_discovery_store_flutter(
    UserDiscoveryStoreFlutter self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_box_autoadd_user_discovery_utils_flutter(
    UserDiscoveryUtilsFlutter self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_flutter_user_discovery(
    FlutterUserDiscovery self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_frb_pqc_pre_key(FrbPqcPreKey self, SseSerializer serializer);

  @protected
  void sse_encode_frb_pre_key_bundle(
    FrbPreKeyBundle self,
    SseSerializer serializer,
  );

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

  @protected
  void sse_encode_init_config(InitConfig self, SseSerializer serializer);

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

  @protected
  void sse_encode_list_frb_pqc_pre_key(
    List<FrbPqcPreKey> self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_list_list_prim_u_8_strict(
    List<Uint8List> self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_list_other_promotion(
    List<OtherPromotion> self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_list_prim_u_8_loose(List<int> self, SseSerializer serializer);

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

  @protected
  void sse_encode_list_record_i_64_list_prim_u_8_strict(
    List<(PlatformInt64, Uint8List)> self,
    SseSerializer serializer,
  );

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

  @protected
  void sse_encode_opt_box_autoadd_announced_user(
    AnnouncedUser? self,
    SseSerializer serializer,
  );

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

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

  @protected
  void sse_encode_opt_list_list_prim_u_8_strict(
    List<Uint8List>? self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_opt_list_other_promotion(
    List<OtherPromotion>? self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_opt_list_prim_u_8_strict(
    Uint8List? self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_other_promotion(
    OtherPromotion self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_record_i_64_list_prim_u_8_strict(
    (PlatformInt64, Uint8List) self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_record_list_prim_u_8_strict_i_64(
    (Uint8List, PlatformInt64) self,
    SseSerializer serializer,
  );

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

  @protected
  void sse_encode_rust_backup_archive(
    RustBackupArchive self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_rust_backup_identity(
    RustBackupIdentity self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_rust_key_manager(
    RustKeyManager self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_rust_signal(RustSignal self, SseSerializer serializer);

  @protected
  void sse_encode_rust_utils(RustUtils self, SseSerializer serializer);

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

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

  @protected
  void sse_encode_u_8_array_32(U8Array32 self, SseSerializer serializer);

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

  @protected
  void sse_encode_user_discovery_store_flutter(
    UserDiscoveryStoreFlutter self,
    SseSerializer serializer,
  );

  @protected
  void sse_encode_user_discovery_utils_flutter(
    UserDiscoveryUtilsFlutter self,
    SseSerializer serializer,
  );

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

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

// Section: wire_class

class RustLibWire implements BaseWire {
  RustLibWire.fromExternalLibrary(ExternalLibrary lib);
}

@JS('wasm_bindgen')
external RustLibWasmModule get wasmModule;

@JS()
@anonymous
extension type RustLibWasmModule._(JSObject _) implements JSObject {}
