diff --git a/frb_example/pure_dart/frb_generated.h b/frb_example/pure_dart/frb_generated.h index 3e74be6ea3..086cc81642 100644 --- a/frb_example/pure_dart/frb_generated.h +++ b/frb_example/pure_dart/frb_generated.h @@ -563,6 +563,14 @@ typedef struct wire_cst_struct_with_impl_block_in_another_file_dependency { } wire_cst_struct_with_impl_block_in_another_file_dependency; +typedef struct wire_cst_struct_with_rust_auto_opaque_field_with_many_derive { + uintptr_t content; +} wire_cst_struct_with_rust_auto_opaque_field_with_many_derive; + +typedef struct wire_cst_struct_with_rust_auto_opaque_with_non_clone_data { + uintptr_t content; +} wire_cst_struct_with_rust_auto_opaque_with_non_clone_data; + typedef struct wire_cst_empty_twin_normal { } wire_cst_empty_twin_normal; @@ -4291,6 +4299,14 @@ WireSyncRust2DartDco frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin void frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_impl_block_in_another_file_f(int64_t port_, struct wire_cst_struct_with_impl_block_in_another_file_dependency *arg); +void frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default(int64_t port_); + +void frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f(int64_t port_, + struct wire_cst_struct_with_rust_auto_opaque_field_with_many_derive *that); + +void frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f(int64_t port_, + struct wire_cst_struct_with_rust_auto_opaque_with_non_clone_data *that); + void frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_b__StructInMiscNoTwinExampleB_get_struct_in_misc_no_twin_example_a(int64_t port_, uintptr_t that); @@ -14029,6 +14045,10 @@ void frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flu void frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal(const void *ptr); +void frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw(const void *ptr); + +void frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw(const void *ptr); + void frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi(const void *ptr); void frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi(const void *ptr); @@ -14261,6 +14281,10 @@ void frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flu void frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse(const void *ptr); +void frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString(const void *ptr); + +void frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString(const void *ptr); + void frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA(const void *ptr); void frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA(const void *ptr); @@ -14811,6 +14835,10 @@ struct wire_cst_struct_with_one_field_twin_rust_async *frbgen_frb_example_pure_d struct wire_cst_struct_with_one_field_twin_sync *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_one_field_twin_sync(void); +struct wire_cst_struct_with_rust_auto_opaque_field_with_many_derive *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive(void); + +struct wire_cst_struct_with_rust_auto_opaque_with_non_clone_data *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data(void); + struct wire_cst_struct_with_two_field_twin_normal *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_two_field_twin_normal(void); struct wire_cst_struct_with_two_field_twin_rust_async *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_two_field_twin_rust_async(void); @@ -15435,6 +15463,8 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_one_field_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_one_field_twin_rust_async); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_one_field_twin_sync); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_two_field_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_two_field_twin_rust_async); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_two_field_twin_sync); @@ -15770,6 +15800,7 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyImplTraitWithSelfTwinSyncSse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyNodeTwinNormal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinNormal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinRustAsync); @@ -15828,6 +15859,7 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSync); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleB); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal); @@ -15989,6 +16021,7 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyImplTraitWithSelfTwinSyncSse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyNodeTwinNormal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinNormal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinRustAsync); @@ -16047,6 +16080,7 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSync); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleB); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal); @@ -16363,6 +16397,9 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__same_function_name_in_different_files); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_custom_name_method_twin_normal_method_with_custom_name_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_impl_block_in_another_file_f); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_b__StructInMiscNoTwinExampleB_get_struct_in_misc_no_twin_example_a); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_b__StructInMiscNoTwinExampleB_sample_function_b); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_b__same_function_name_in_different_files); diff --git a/frb_example/pure_dart/lib/src/rust/api/misc_no_twin_example_a.dart b/frb_example/pure_dart/lib/src/rust/api/misc_no_twin_example_a.dart index 73847ed6c0..c55c405e63 100644 --- a/frb_example/pure_dart/lib/src/rust/api/misc_no_twin_example_a.dart +++ b/frb_example/pure_dart/lib/src/rust/api/misc_no_twin_example_a.dart @@ -3,13 +3,15 @@ // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import +import '../auxiliary/sample_types.dart'; import '../frb_generated.dart'; +import '../lib.dart'; import 'misc_no_twin_example_b.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; // These functions are ignored because they are not marked as `pub`: `log` // These types are ignored because they are not used by any `pub` functions: `Issue2170Struct` -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `fmt`, `fmt` +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `clone`, `clone`, `fmt`, `fmt`, `fmt` Future sameFunctionNameInDifferentFiles() => RustLib.instance.api .crateApiMiscNoTwinExampleASameFunctionNameInDifferentFiles(); @@ -210,3 +212,53 @@ class StructWithImplBlockInAnotherFile { other is StructWithImplBlockInAnotherFile && runtimeType == other.runtimeType; } + +class StructWithRustAutoOpaqueFieldWithManyDerive { + final String content; + + const StructWithRustAutoOpaqueFieldWithManyDerive({ + required this.content, + }); + + static Future default_() => RustLib + .instance.api + .crateApiMiscNoTwinExampleAStructWithRustAutoOpaqueFieldWithManyDeriveDefault(); + + Future f() => RustLib.instance.api + .crateApiMiscNoTwinExampleAStructWithRustAutoOpaqueFieldWithManyDeriveF( + that: this, + ); + + @override + int get hashCode => content.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithRustAutoOpaqueFieldWithManyDerive && + runtimeType == other.runtimeType && + content == other.content; +} + +class StructWithRustAutoOpaqueWithNonCloneData { + final NonCloneDataRaw content; + + const StructWithRustAutoOpaqueWithNonCloneData({ + required this.content, + }); + + Future f() => RustLib.instance.api + .crateApiMiscNoTwinExampleAStructWithRustAutoOpaqueWithNonCloneDataF( + that: this, + ); + + @override + int get hashCode => content.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithRustAutoOpaqueWithNonCloneData && + runtimeType == other.runtimeType && + content == other.content; +} diff --git a/frb_example/pure_dart/lib/src/rust/auxiliary/sample_types.dart b/frb_example/pure_dart/lib/src/rust/auxiliary/sample_types.dart index e951d5d8ca..187c153f81 100644 --- a/frb_example/pure_dart/lib/src/rust/auxiliary/sample_types.dart +++ b/frb_example/pure_dart/lib/src/rust/auxiliary/sample_types.dart @@ -6,6 +6,9 @@ import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// Rust type: RustOpaqueNom> +abstract class NonCloneDataRaw implements RustOpaqueInterface {} + enum MyEnum { false_, true_, diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.dart index ad80ebac0b..37d7131fab 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.dart @@ -272,6 +272,7 @@ import 'deliberate_name_conflict.dart'; import 'frb_generated.dart'; import 'frb_generated.io.dart' if (dart.library.js_interop) 'frb_generated.web.dart'; +import 'lib.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'package:meta/meta.dart' as meta; @@ -337,7 +338,7 @@ class RustLib extends BaseEntrypoint { String get codegenVersion => '2.3.0'; @override - int get rustContentHash => 1810234069; + int get rustContentHash => -1683013433; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -1258,6 +1259,17 @@ abstract class RustLibApi extends BaseApi { Future crateApiMiscNoTwinExampleAStructWithImplBlockInAnotherFileF( {required StructWithImplBlockInAnotherFileDependency arg}); + Future + crateApiMiscNoTwinExampleAStructWithRustAutoOpaqueFieldWithManyDeriveDefault(); + + Future + crateApiMiscNoTwinExampleAStructWithRustAutoOpaqueFieldWithManyDeriveF( + {required StructWithRustAutoOpaqueFieldWithManyDerive that}); + + Future + crateApiMiscNoTwinExampleAStructWithRustAutoOpaqueWithNonCloneDataF( + {required StructWithRustAutoOpaqueWithNonCloneData that}); + Future crateApiMiscNoTwinExampleBStructInMiscNoTwinExampleBGetStructInMiscNoTwinExampleA( {required StructInMiscNoTwinExampleB that}); @@ -11437,6 +11449,15 @@ abstract class RustLibApi extends BaseApi { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_MyStructWithTryFromTwinNormalPtr; + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_NonCloneDataRaw; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_NonCloneDataRaw; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_NonCloneDataRawPtr; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_NonCloneSimpleEnumTwinMoi; @@ -11958,6 +11979,12 @@ abstract class RustLibApi extends BaseApi { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_StaticGetterOnlyTwinSyncSsePtr; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_String; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_String; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_StringPtr; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_StructInMiscNoTwinExampleA; @@ -20343,6 +20370,97 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["arg"], ); + @override + Future + crateApiMiscNoTwinExampleAStructWithRustAutoOpaqueFieldWithManyDeriveDefault() { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire + .wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default( + port_); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_struct_with_rust_auto_opaque_field_with_many_derive, + decodeErrorData: null, + ), + constMeta: + kCrateApiMiscNoTwinExampleAStructWithRustAutoOpaqueFieldWithManyDeriveDefaultConstMeta, + argValues: [], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiMiscNoTwinExampleAStructWithRustAutoOpaqueFieldWithManyDeriveDefaultConstMeta => + const TaskConstMeta( + debugName: + "struct_with_rust_auto_opaque_field_with_many_derive_default", + argNames: [], + ); + + @override + Future + crateApiMiscNoTwinExampleAStructWithRustAutoOpaqueFieldWithManyDeriveF( + {required StructWithRustAutoOpaqueFieldWithManyDerive that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + that); + return wire + .wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMiscNoTwinExampleAStructWithRustAutoOpaqueFieldWithManyDeriveFConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiMiscNoTwinExampleAStructWithRustAutoOpaqueFieldWithManyDeriveFConstMeta => + const TaskConstMeta( + debugName: "struct_with_rust_auto_opaque_field_with_many_derive_f", + argNames: ["that"], + ); + + @override + Future + crateApiMiscNoTwinExampleAStructWithRustAutoOpaqueWithNonCloneDataF( + {required StructWithRustAutoOpaqueWithNonCloneData that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + that); + return wire + .wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMiscNoTwinExampleAStructWithRustAutoOpaqueWithNonCloneDataFConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiMiscNoTwinExampleAStructWithRustAutoOpaqueWithNonCloneDataFConstMeta => + const TaskConstMeta( + debugName: "struct_with_rust_auto_opaque_with_non_clone_data_f", + argNames: ["that"], + ); + @override Future crateApiMiscNoTwinExampleBStructInMiscNoTwinExampleBGetStructInMiscNoTwinExampleA( @@ -96864,6 +96982,14 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { get rust_arc_decrement_strong_count_MyStructWithTryFromTwinNormal => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal; + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_NonCloneDataRaw => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_NonCloneDataRaw => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_NonCloneSimpleEnumTwinMoi => wire .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi; @@ -97328,6 +97454,14 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { get rust_arc_decrement_strong_count_StaticGetterOnlyTwinSyncSse => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse; + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_String => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_String => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_StructInMiscNoTwinExampleA => wire .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA; @@ -97617,6 +97751,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { raw); } + @protected + NonCloneDataRaw + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + raw); + } + @protected NonCloneSimpleTwinMoi dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( @@ -97734,6 +97877,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { raw); } + @protected + String + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + raw); + } + @protected StructOneWithTraitForDynTwinNormal dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal( @@ -101918,6 +102070,14 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { raw as List); } + @protected + NonCloneDataRaw + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return NonCloneDataRawImpl.frbInternalDcoDecode(raw as List); + } + @protected NonCloneSimpleEnumTwinMoi dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( @@ -102422,6 +102582,14 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { raw as List); } + @protected + String + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return StringImpl.frbInternalDcoDecode(raw as List); + } + @protected StructInMiscNoTwinExampleA dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( @@ -107195,6 +107363,22 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return dco_decode_struct_with_one_field_twin_sync_sse(raw); } + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + dco_decode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_rust_auto_opaque_field_with_many_derive(raw); + } + + @protected + StructWithRustAutoOpaqueWithNonCloneData + dco_decode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_rust_auto_opaque_with_non_clone_data(raw); + } + @protected StructWithTwoFieldTwinNormal dco_decode_box_autoadd_struct_with_two_field_twin_normal(dynamic raw) { @@ -118185,6 +118369,35 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); } + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + dco_decode_struct_with_rust_auto_opaque_field_with_many_derive( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return StructWithRustAutoOpaqueFieldWithManyDerive( + content: + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + arr[0]), + ); + } + + @protected + StructWithRustAutoOpaqueWithNonCloneData + dco_decode_struct_with_rust_auto_opaque_with_non_clone_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return StructWithRustAutoOpaqueWithNonCloneData( + content: + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + arr[0]), + ); + } + @protected StructWithTwoFieldTwinNormal dco_decode_struct_with_two_field_twin_normal( dynamic raw) { @@ -119307,6 +119520,17 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return inner; } + @protected + NonCloneDataRaw + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + deserializer); + return inner; + } + @protected NonCloneSimpleTwinMoi sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( @@ -119450,6 +119674,17 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return inner; } + @protected + String + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + deserializer); + return inner; + } + @protected StructOneWithTraitForDynTwinNormal sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal( @@ -123756,6 +123991,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + NonCloneDataRaw + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return NonCloneDataRawImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected NonCloneSimpleEnumTwinMoi sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( @@ -124278,6 +124522,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + String + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return StringImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected StructInMiscNoTwinExampleA sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( @@ -129024,6 +129277,24 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return (sse_decode_struct_with_one_field_twin_sync_sse(deserializer)); } + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + sse_decode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_rust_auto_opaque_field_with_many_derive( + deserializer)); + } + + @protected + StructWithRustAutoOpaqueWithNonCloneData + sse_decode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_rust_auto_opaque_with_non_clone_data( + deserializer)); + } + @protected StructWithTwoFieldTwinNormal sse_decode_box_autoadd_struct_with_two_field_twin_normal( @@ -140954,6 +141225,28 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return StructWithOneFieldTwinSyncSse(a: var_a); } + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + sse_decode_struct_with_rust_auto_opaque_field_with_many_derive( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_content = + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + deserializer); + return StructWithRustAutoOpaqueFieldWithManyDerive(content: var_content); + } + + @protected + StructWithRustAutoOpaqueWithNonCloneData + sse_decode_struct_with_rust_auto_opaque_with_non_clone_data( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_content = + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + deserializer); + return StructWithRustAutoOpaqueWithNonCloneData(content: var_content); + } + @protected StructWithTwoFieldTwinNormal sse_decode_struct_with_two_field_twin_normal( SseDeserializer deserializer) { @@ -144068,6 +144361,14 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return (raw as MyStructWithTryFromTwinNormalImpl).frbInternalCstEncode(); } + @protected + int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + NonCloneDataRaw raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as NonCloneDataRawImpl).frbInternalCstEncode(); + } + @protected int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( NonCloneSimpleEnumTwinMoi raw) { @@ -144319,6 +144620,14 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return (raw as StaticGetterOnlyTwinSyncImpl).frbInternalCstEncode(); } + @protected + int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + String raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as StringImpl).frbInternalCstEncode(); + } + @protected int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( StructInMiscNoTwinExampleA raw) { @@ -144799,6 +145108,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { self, serializer); } + @protected + void + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + NonCloneDataRaw self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + self, serializer); + } + @protected void sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( @@ -144916,6 +145234,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { self, serializer); } + @protected + void + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + String self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + self, serializer); + } + @protected void sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal( @@ -149931,6 +150258,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { serializer); } + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + NonCloneDataRaw self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as NonCloneDataRawImpl).frbInternalSseEncode(move: null), + serializer); + } + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( @@ -150543,6 +150880,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { serializer); } + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + String self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as StringImpl).frbInternalSseEncode(move: null), serializer); + } + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( @@ -155446,6 +155792,24 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_struct_with_one_field_twin_sync_sse(self, serializer); } + @protected + void + sse_encode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + StructWithRustAutoOpaqueFieldWithManyDerive self, + SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_rust_auto_opaque_field_with_many_derive( + self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + StructWithRustAutoOpaqueWithNonCloneData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_rust_auto_opaque_with_non_clone_data( + self, serializer); + } + @protected void sse_encode_box_autoadd_struct_with_two_field_twin_normal( StructWithTwoFieldTwinNormal self, SseSerializer serializer) { @@ -165472,6 +165836,23 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(self.a, serializer); } + @protected + void sse_encode_struct_with_rust_auto_opaque_field_with_many_derive( + StructWithRustAutoOpaqueFieldWithManyDerive self, + SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + self.content, serializer); + } + + @protected + void sse_encode_struct_with_rust_auto_opaque_with_non_clone_data( + StructWithRustAutoOpaqueWithNonCloneData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + self.content, serializer); + } + @protected void sse_encode_struct_with_two_field_twin_normal( StructWithTwoFieldTwinNormal self, SseSerializer serializer) { @@ -169055,6 +169436,26 @@ class MyStructWithTryFromTwinNormalImpl extends RustOpaque ); } +@sealed +class NonCloneDataRawImpl extends RustOpaque implements NonCloneDataRaw { + // Not to be used by end users + NonCloneDataRawImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + NonCloneDataRawImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + RustLib.instance.api.rust_arc_increment_strong_count_NonCloneDataRaw, + rustArcDecrementStrongCount: + RustLib.instance.api.rust_arc_decrement_strong_count_NonCloneDataRaw, + rustArcDecrementStrongCountPtr: + RustLib.instance.api.rust_arc_decrement_strong_count_NonCloneDataRawPtr, + ); +} + @sealed class NonCloneDataTwinMoiImpl extends RustOpaque implements NonCloneDataTwinMoi { @@ -171188,6 +171589,26 @@ class StaticGetterOnlyTwinSyncSseImpl extends RustOpaque ); } +@sealed +class StringImpl extends RustOpaque implements String { + // Not to be used by end users + StringImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + StringImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + RustLib.instance.api.rust_arc_increment_strong_count_String, + rustArcDecrementStrongCount: + RustLib.instance.api.rust_arc_decrement_strong_count_String, + rustArcDecrementStrongCountPtr: + RustLib.instance.api.rust_arc_decrement_strong_count_StringPtr, + ); +} + @sealed class StructInMiscNoTwinExampleAImpl extends RustOpaque implements StructInMiscNoTwinExampleA { diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart index 74a10ec62f..8c405ca8bd 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart @@ -267,6 +267,7 @@ import 'dart:convert'; import 'dart:ffi' as ffi; import 'deliberate_name_conflict.dart'; import 'frb_generated.dart'; +import 'lib.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; import 'package:meta/meta.dart' as meta; import 'package:uuid/uuid.dart'; @@ -811,6 +812,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { get rust_arc_decrement_strong_count_MyStructWithTryFromTwinNormalPtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormalPtr; + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_NonCloneDataRawPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRawPtr; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_NonCloneSimpleEnumTwinMoiPtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoiPtr; @@ -1043,6 +1048,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { get rust_arc_decrement_strong_count_StaticGetterOnlyTwinSyncSsePtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSsePtr; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_StringPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStringPtr; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_StructInMiscNoTwinExampleAPtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleAPtr; @@ -1191,6 +1199,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyNodeTwinNormal( dynamic raw); + @protected + NonCloneDataRaw + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + dynamic raw); + @protected NonCloneSimpleTwinMoi dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( @@ -1256,6 +1269,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOpaqueItemTwinNormal( dynamic raw); + @protected + String + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + dynamic raw); + @protected StructOneWithTraitForDynTwinNormal dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal( @@ -3524,6 +3542,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal( dynamic raw); + @protected + NonCloneDataRaw + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + dynamic raw); + @protected NonCloneSimpleEnumTwinMoi dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( @@ -3814,6 +3837,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse( dynamic raw); + @protected + String + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + dynamic raw); + @protected StructInMiscNoTwinExampleA dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( @@ -6174,6 +6202,16 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithOneFieldTwinSyncSse dco_decode_box_autoadd_struct_with_one_field_twin_sync_sse(dynamic raw); + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + dco_decode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + dynamic raw); + + @protected + StructWithRustAutoOpaqueWithNonCloneData + dco_decode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + dynamic raw); + @protected StructWithTwoFieldTwinNormal dco_decode_box_autoadd_struct_with_two_field_twin_normal(dynamic raw); @@ -9788,6 +9826,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithOneFieldTwinSyncSse dco_decode_struct_with_one_field_twin_sync_sse( dynamic raw); + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + dco_decode_struct_with_rust_auto_opaque_field_with_many_derive( + dynamic raw); + + @protected + StructWithRustAutoOpaqueWithNonCloneData + dco_decode_struct_with_rust_auto_opaque_with_non_clone_data(dynamic raw); + @protected StructWithTwoFieldTwinNormal dco_decode_struct_with_two_field_twin_normal( dynamic raw); @@ -10154,6 +10201,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyNodeTwinNormal( SseDeserializer deserializer); + @protected + NonCloneDataRaw + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + SseDeserializer deserializer); + @protected NonCloneSimpleTwinMoi sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( @@ -10219,6 +10271,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOpaqueItemTwinNormal( SseDeserializer deserializer); + @protected + String + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + SseDeserializer deserializer); + @protected StructOneWithTraitForDynTwinNormal sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal( @@ -12487,6 +12544,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal( SseDeserializer deserializer); + @protected + NonCloneDataRaw + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + SseDeserializer deserializer); + @protected NonCloneSimpleEnumTwinMoi sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( @@ -12777,6 +12839,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse( SseDeserializer deserializer); + @protected + String + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + SseDeserializer deserializer); + @protected StructInMiscNoTwinExampleA sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( @@ -15327,6 +15394,16 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_struct_with_one_field_twin_sync_sse( SseDeserializer deserializer); + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + sse_decode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + SseDeserializer deserializer); + + @protected + StructWithRustAutoOpaqueWithNonCloneData + sse_decode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + SseDeserializer deserializer); + @protected StructWithTwoFieldTwinNormal sse_decode_box_autoadd_struct_with_two_field_twin_normal( @@ -19454,6 +19531,16 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithOneFieldTwinSyncSse sse_decode_struct_with_one_field_twin_sync_sse( SseDeserializer deserializer); + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + sse_decode_struct_with_rust_auto_opaque_field_with_many_derive( + SseDeserializer deserializer); + + @protected + StructWithRustAutoOpaqueWithNonCloneData + sse_decode_struct_with_rust_auto_opaque_with_non_clone_data( + SseDeserializer deserializer); + @protected StructWithTwoFieldTwinNormal sse_decode_struct_with_two_field_twin_normal( SseDeserializer deserializer); @@ -19851,6 +19938,14 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { raw); } + @protected + int cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + NonCloneDataRaw raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + raw); + } + @protected int cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( NonCloneSimpleTwinMoi raw) { @@ -19907,6 +20002,14 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { raw); } + @protected + int cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + String raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + raw); + } + @protected int cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal( StructOneWithTraitForDynTwinNormal raw) { @@ -22877,6 +22980,30 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return ptr; } + @protected + ffi.Pointer + cst_encode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + StructWithRustAutoOpaqueFieldWithManyDerive raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire + .cst_new_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive(); + cst_api_fill_to_wire_struct_with_rust_auto_opaque_field_with_many_derive( + raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + StructWithRustAutoOpaqueWithNonCloneData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire + .cst_new_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data(); + cst_api_fill_to_wire_struct_with_rust_auto_opaque_with_non_clone_data( + raw, ptr.ref); + return ptr; + } + @protected ffi.Pointer cst_encode_box_autoadd_struct_with_two_field_twin_normal( @@ -27943,6 +28070,27 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { cst_api_fill_to_wire_struct_with_one_field_twin_sync(apiObj, wireObj.ref); } + @protected + void + cst_api_fill_to_wire_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + StructWithRustAutoOpaqueFieldWithManyDerive apiObj, + ffi.Pointer< + wire_cst_struct_with_rust_auto_opaque_field_with_many_derive> + wireObj) { + cst_api_fill_to_wire_struct_with_rust_auto_opaque_field_with_many_derive( + apiObj, wireObj.ref); + } + + @protected + void + cst_api_fill_to_wire_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + StructWithRustAutoOpaqueWithNonCloneData apiObj, + ffi.Pointer + wireObj) { + cst_api_fill_to_wire_struct_with_rust_auto_opaque_with_non_clone_data( + apiObj, wireObj.ref); + } + @protected void cst_api_fill_to_wire_box_autoadd_struct_with_two_field_twin_normal( StructWithTwoFieldTwinNormal apiObj, @@ -31242,6 +31390,24 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wireObj.a = cst_encode_i_32(apiObj.a); } + @protected + void cst_api_fill_to_wire_struct_with_rust_auto_opaque_field_with_many_derive( + StructWithRustAutoOpaqueFieldWithManyDerive apiObj, + wire_cst_struct_with_rust_auto_opaque_field_with_many_derive wireObj) { + wireObj.content = + cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + apiObj.content); + } + + @protected + void cst_api_fill_to_wire_struct_with_rust_auto_opaque_with_non_clone_data( + StructWithRustAutoOpaqueWithNonCloneData apiObj, + wire_cst_struct_with_rust_auto_opaque_with_non_clone_data wireObj) { + wireObj.content = + cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + apiObj.content); + } + @protected void cst_api_fill_to_wire_struct_with_two_field_twin_normal( StructWithTwoFieldTwinNormal apiObj, @@ -32486,6 +32652,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal( MyStructWithTryFromTwinNormal raw); + @protected + int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + NonCloneDataRaw raw); + @protected int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( NonCloneSimpleEnumTwinMoi raw); @@ -32610,6 +32780,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSync( StaticGetterOnlyTwinSync raw); + @protected + int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + String raw); + @protected int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( StructInMiscNoTwinExampleA raw); @@ -32848,6 +33022,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyNodeTwinNormal( MyNodeTwinNormal self, SseSerializer serializer); + @protected + void + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + NonCloneDataRaw self, SseSerializer serializer); + @protected void sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( @@ -32913,6 +33092,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOpaqueItemTwinNormal( OpaqueItemTwinNormal self, SseSerializer serializer); + @protected + void + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + String self, SseSerializer serializer); + @protected void sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal( @@ -35289,6 +35473,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal( MyStructWithTryFromTwinNormal self, SseSerializer serializer); + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + NonCloneDataRaw self, SseSerializer serializer); + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( @@ -35579,6 +35768,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse( StaticGetterOnlyTwinSyncSse self, SseSerializer serializer); + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + String self, SseSerializer serializer); + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( @@ -37996,6 +38190,16 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_struct_with_one_field_twin_sync_sse( StructWithOneFieldTwinSyncSse self, SseSerializer serializer); + @protected + void + sse_encode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + StructWithRustAutoOpaqueFieldWithManyDerive self, + SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + StructWithRustAutoOpaqueWithNonCloneData self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_two_field_twin_normal( StructWithTwoFieldTwinNormal self, SseSerializer serializer); @@ -41921,6 +42125,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_struct_with_one_field_twin_sync_sse( StructWithOneFieldTwinSyncSse self, SseSerializer serializer); + @protected + void sse_encode_struct_with_rust_auto_opaque_field_with_many_derive( + StructWithRustAutoOpaqueFieldWithManyDerive self, + SseSerializer serializer); + + @protected + void sse_encode_struct_with_rust_auto_opaque_with_non_clone_data( + StructWithRustAutoOpaqueWithNonCloneData self, SseSerializer serializer); + @protected void sse_encode_struct_with_two_field_twin_normal( StructWithTwoFieldTwinNormal self, SseSerializer serializer); @@ -48087,6 +48300,77 @@ class RustLibWire implements BaseWire { ffi.Pointer< wire_cst_struct_with_impl_block_in_another_file_dependency>)>(); + void + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default( + int port_, + ) { + return _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default( + port_, + ); + } + + late final _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_defaultPtr = + _lookup>( + 'frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default'); + late final _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default = + _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_defaultPtr + .asFunction(); + + void + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f( + int port_, + ffi.Pointer + that, + ) { + return _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f( + port_, + that, + ); + } + + late final _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_fPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer< + wire_cst_struct_with_rust_auto_opaque_field_with_many_derive>)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f'); + late final _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f = + _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_fPtr + .asFunction< + void Function( + int, + ffi.Pointer< + wire_cst_struct_with_rust_auto_opaque_field_with_many_derive>)>(); + + void + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f( + port_, + that, + ); + } + + late final _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_fPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer< + wire_cst_struct_with_rust_auto_opaque_with_non_clone_data>)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f'); + late final _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f = + _wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_fPtr + .asFunction< + void Function( + int, + ffi.Pointer< + wire_cst_struct_with_rust_auto_opaque_with_non_clone_data>)>(); + void wire__crate__api__misc_no_twin_example_b__StructInMiscNoTwinExampleB_get_struct_in_misc_no_twin_example_a( int port_, @@ -107810,6 +108094,38 @@ class RustLibWire implements BaseWire { _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormalPtr .asFunction)>(); + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRawPtr = + _lookup)>>( + 'frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw'); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRawPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRawPtr = + _lookup)>>( + 'frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw'); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRawPtr + .asFunction)>(); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( ffi.Pointer ptr, @@ -109666,6 +109982,38 @@ class RustLibWire implements BaseWire { _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSsePtr .asFunction)>(); + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStringPtr = + _lookup)>>( + 'frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString'); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStringPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStringPtr = + _lookup)>>( + 'frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString'); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStringPtr + .asFunction)>(); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( ffi.Pointer ptr, @@ -113675,6 +114023,44 @@ class RustLibWire implements BaseWire { _cst_new_box_autoadd_struct_with_one_field_twin_syncPtr.asFunction< ffi.Pointer Function()>(); + ffi.Pointer + cst_new_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive() { + return _cst_new_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive(); + } + + late final _cst_new_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derivePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer< + wire_cst_struct_with_rust_auto_opaque_field_with_many_derive> + Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive'); + late final _cst_new_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive = + _cst_new_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derivePtr + .asFunction< + ffi.Pointer< + wire_cst_struct_with_rust_auto_opaque_field_with_many_derive> + Function()>(); + + ffi.Pointer + cst_new_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data() { + return _cst_new_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data(); + } + + late final _cst_new_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_dataPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer< + wire_cst_struct_with_rust_auto_opaque_with_non_clone_data> + Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data'); + late final _cst_new_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data = + _cst_new_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_dataPtr + .asFunction< + ffi.Pointer< + wire_cst_struct_with_rust_auto_opaque_with_non_clone_data> + Function()>(); + ffi.Pointer cst_new_box_autoadd_struct_with_two_field_twin_normal() { return _cst_new_box_autoadd_struct_with_two_field_twin_normal(); @@ -117751,6 +118137,18 @@ final class wire_cst_struct_with_custom_name_method_twin_normal final class wire_cst_struct_with_impl_block_in_another_file_dependency extends ffi.Opaque {} +final class wire_cst_struct_with_rust_auto_opaque_field_with_many_derive + extends ffi.Struct { + @ffi.UintPtr() + external int content; +} + +final class wire_cst_struct_with_rust_auto_opaque_with_non_clone_data + extends ffi.Struct { + @ffi.UintPtr() + external int content; +} + final class wire_cst_empty_twin_normal extends ffi.Opaque {} final class wire_cst_list_my_size extends ffi.Struct { diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.web.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.web.dart index 9da911ba01..bd95ceac0f 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.web.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.web.dart @@ -269,6 +269,7 @@ import 'dart:async'; import 'dart:convert'; import 'deliberate_name_conflict.dart'; import 'frb_generated.dart'; +import 'lib.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_web.dart'; import 'package:meta/meta.dart' as meta; import 'package:uuid/uuid.dart'; @@ -813,6 +814,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { get rust_arc_decrement_strong_count_MyStructWithTryFromTwinNormalPtr => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal; + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_NonCloneDataRawPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_NonCloneSimpleEnumTwinMoiPtr => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi; @@ -1045,6 +1050,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { get rust_arc_decrement_strong_count_StaticGetterOnlyTwinSyncSsePtr => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_StringPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_StructInMiscNoTwinExampleAPtr => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA; @@ -1193,6 +1201,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyNodeTwinNormal( dynamic raw); + @protected + NonCloneDataRaw + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + dynamic raw); + @protected NonCloneSimpleTwinMoi dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( @@ -1258,6 +1271,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOpaqueItemTwinNormal( dynamic raw); + @protected + String + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + dynamic raw); + @protected StructOneWithTraitForDynTwinNormal dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal( @@ -3526,6 +3544,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal( dynamic raw); + @protected + NonCloneDataRaw + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + dynamic raw); + @protected NonCloneSimpleEnumTwinMoi dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( @@ -3816,6 +3839,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse( dynamic raw); + @protected + String + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + dynamic raw); + @protected StructInMiscNoTwinExampleA dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( @@ -6176,6 +6204,16 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithOneFieldTwinSyncSse dco_decode_box_autoadd_struct_with_one_field_twin_sync_sse(dynamic raw); + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + dco_decode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + dynamic raw); + + @protected + StructWithRustAutoOpaqueWithNonCloneData + dco_decode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + dynamic raw); + @protected StructWithTwoFieldTwinNormal dco_decode_box_autoadd_struct_with_two_field_twin_normal(dynamic raw); @@ -9790,6 +9828,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithOneFieldTwinSyncSse dco_decode_struct_with_one_field_twin_sync_sse( dynamic raw); + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + dco_decode_struct_with_rust_auto_opaque_field_with_many_derive( + dynamic raw); + + @protected + StructWithRustAutoOpaqueWithNonCloneData + dco_decode_struct_with_rust_auto_opaque_with_non_clone_data(dynamic raw); + @protected StructWithTwoFieldTwinNormal dco_decode_struct_with_two_field_twin_normal( dynamic raw); @@ -10156,6 +10203,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyNodeTwinNormal( SseDeserializer deserializer); + @protected + NonCloneDataRaw + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + SseDeserializer deserializer); + @protected NonCloneSimpleTwinMoi sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( @@ -10221,6 +10273,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOpaqueItemTwinNormal( SseDeserializer deserializer); + @protected + String + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + SseDeserializer deserializer); + @protected StructOneWithTraitForDynTwinNormal sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal( @@ -12489,6 +12546,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal( SseDeserializer deserializer); + @protected + NonCloneDataRaw + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + SseDeserializer deserializer); + @protected NonCloneSimpleEnumTwinMoi sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( @@ -12779,6 +12841,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse( SseDeserializer deserializer); + @protected + String + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + SseDeserializer deserializer); + @protected StructInMiscNoTwinExampleA sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( @@ -15329,6 +15396,16 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_struct_with_one_field_twin_sync_sse( SseDeserializer deserializer); + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + sse_decode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + SseDeserializer deserializer); + + @protected + StructWithRustAutoOpaqueWithNonCloneData + sse_decode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + SseDeserializer deserializer); + @protected StructWithTwoFieldTwinNormal sse_decode_box_autoadd_struct_with_two_field_twin_normal( @@ -19456,6 +19533,16 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithOneFieldTwinSyncSse sse_decode_struct_with_one_field_twin_sync_sse( SseDeserializer deserializer); + @protected + StructWithRustAutoOpaqueFieldWithManyDerive + sse_decode_struct_with_rust_auto_opaque_field_with_many_derive( + SseDeserializer deserializer); + + @protected + StructWithRustAutoOpaqueWithNonCloneData + sse_decode_struct_with_rust_auto_opaque_with_non_clone_data( + SseDeserializer deserializer); + @protected StructWithTwoFieldTwinNormal sse_decode_struct_with_two_field_twin_normal( SseDeserializer deserializer); @@ -19852,6 +19939,14 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { raw); } + @protected + int cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + NonCloneDataRaw raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + raw); + } + @protected int cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( NonCloneSimpleTwinMoi raw) { @@ -19908,6 +20003,14 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { raw); } + @protected + int cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + String raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + raw); + } + @protected int cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal( StructOneWithTraitForDynTwinNormal raw) { @@ -22560,6 +22663,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return cst_encode_struct_with_one_field_twin_sync(raw); } + @protected + JSAny + cst_encode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + StructWithRustAutoOpaqueFieldWithManyDerive raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_struct_with_rust_auto_opaque_field_with_many_derive(raw); + } + + @protected + JSAny cst_encode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + StructWithRustAutoOpaqueWithNonCloneData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_struct_with_rust_auto_opaque_with_non_clone_data(raw); + } + @protected JSAny cst_encode_box_autoadd_struct_with_two_field_twin_normal( StructWithTwoFieldTwinNormal raw) { @@ -27567,6 +27685,26 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return [cst_encode_i_32(raw.a)].jsify()!; } + @protected + JSAny cst_encode_struct_with_rust_auto_opaque_field_with_many_derive( + StructWithRustAutoOpaqueFieldWithManyDerive raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + raw.content) + ].jsify()!; + } + + @protected + JSAny cst_encode_struct_with_rust_auto_opaque_with_non_clone_data( + StructWithRustAutoOpaqueWithNonCloneData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + raw.content) + ].jsify()!; + } + @protected JSAny cst_encode_struct_with_two_field_twin_normal( StructWithTwoFieldTwinNormal raw) { @@ -28926,6 +29064,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal( MyStructWithTryFromTwinNormal raw); + @protected + int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + NonCloneDataRaw raw); + @protected int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( NonCloneSimpleEnumTwinMoi raw); @@ -29050,6 +29192,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSync( StaticGetterOnlyTwinSync raw); + @protected + int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + String raw); + @protected int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( StructInMiscNoTwinExampleA raw); @@ -29288,6 +29434,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyNodeTwinNormal( MyNodeTwinNormal self, SseSerializer serializer); + @protected + void + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + NonCloneDataRaw self, SseSerializer serializer); + @protected void sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( @@ -29353,6 +29504,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOpaqueItemTwinNormal( OpaqueItemTwinNormal self, SseSerializer serializer); + @protected + void + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + String self, SseSerializer serializer); + @protected void sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructOneWithTraitForDynTwinNormal( @@ -31729,6 +31885,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal( MyStructWithTryFromTwinNormal self, SseSerializer serializer); + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + NonCloneDataRaw self, SseSerializer serializer); + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( @@ -32019,6 +32180,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse( StaticGetterOnlyTwinSyncSse self, SseSerializer serializer); + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + String self, SseSerializer serializer); + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( @@ -34436,6 +34602,16 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_struct_with_one_field_twin_sync_sse( StructWithOneFieldTwinSyncSse self, SseSerializer serializer); + @protected + void + sse_encode_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + StructWithRustAutoOpaqueFieldWithManyDerive self, + SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + StructWithRustAutoOpaqueWithNonCloneData self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_two_field_twin_normal( StructWithTwoFieldTwinNormal self, SseSerializer serializer); @@ -38361,6 +38537,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_struct_with_one_field_twin_sync_sse( StructWithOneFieldTwinSyncSse self, SseSerializer serializer); + @protected + void sse_encode_struct_with_rust_auto_opaque_field_with_many_derive( + StructWithRustAutoOpaqueFieldWithManyDerive self, + SseSerializer serializer); + + @protected + void sse_encode_struct_with_rust_auto_opaque_with_non_clone_data( + StructWithRustAutoOpaqueWithNonCloneData self, SseSerializer serializer); + @protected void sse_encode_struct_with_two_field_twin_normal( StructWithTwoFieldTwinNormal self, SseSerializer serializer); @@ -40487,6 +40672,24 @@ class RustLibWire implements BaseWire { .wire__crate__api__misc_no_twin_example_a__struct_with_impl_block_in_another_file_f( port_, arg); + void wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default( + NativePortType port_) => + wasmModule + .wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default( + port_); + + void wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f( + NativePortType port_, JSAny that) => + wasmModule + .wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f( + port_, that); + + void wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f( + NativePortType port_, JSAny that) => + wasmModule + .wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f( + port_, that); + void wire__crate__api__misc_no_twin_example_b__StructInMiscNoTwinExampleB_get_struct_in_misc_no_twin_example_a( NativePortType port_, int that) => wasmModule @@ -60985,6 +61188,18 @@ class RustLibWire implements BaseWire { .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal( ptr); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + int ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + ptr); + + void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + int ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + ptr); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( int ptr) => wasmModule @@ -61681,6 +61896,18 @@ class RustLibWire implements BaseWire { .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse( ptr); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + int ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + ptr); + + void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + int ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + ptr); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( int ptr) => wasmModule @@ -63157,6 +63384,18 @@ extension type RustLibWasmModule._(JSObject _) implements JSObject { wire__crate__api__misc_no_twin_example_a__struct_with_impl_block_in_another_file_f( NativePortType port_, JSAny arg); + external void + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default( + NativePortType port_); + + external void + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f( + NativePortType port_, JSAny that); + + external void + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f( + NativePortType port_, JSAny that); + external void wire__crate__api__misc_no_twin_example_b__StructInMiscNoTwinExampleB_get_struct_in_misc_no_twin_example_a( NativePortType port_, int that); @@ -77414,6 +77653,14 @@ extension type RustLibWasmModule._(JSObject _) implements JSObject { rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyStructWithTryFromTwinNormal( int ptr); + external void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + int ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + int ptr); + external void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( int ptr); @@ -77878,6 +78125,14 @@ extension type RustLibWasmModule._(JSObject _) implements JSObject { rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStaticGetterOnlyTwinSyncSse( int ptr); + external void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + int ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + int ptr); + external void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( int ptr); diff --git a/frb_example/pure_dart/lib/src/rust/lib.dart b/frb_example/pure_dart/lib/src/rust/lib.dart new file mode 100644 index 0000000000..34a2a96679 --- /dev/null +++ b/frb_example/pure_dart/lib/src/rust/lib.dart @@ -0,0 +1,10 @@ +// This file is automatically generated, so please do not edit it. +// @generated by `flutter_rust_bridge`@ 2.3.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'frb_generated.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +// Rust type: RustOpaqueNom> +abstract class String implements RustOpaqueInterface {} diff --git a/frb_example/pure_dart/rust/src/frb_generated.rs b/frb_example/pure_dart/rust/src/frb_generated.rs index 5af67cd6b3..df9fc29a50 100644 --- a/frb_example/pure_dart/rust/src/frb_generated.rs +++ b/frb_example/pure_dart/rust/src/frb_generated.rs @@ -88,6 +88,8 @@ use crate::api::pseudo_manual::rust_opaque_twin_sync_sse_moi::*; use crate::api::rust_auto_opaque::*; use crate::api::rust_opaque::*; use crate::api::rust_opaque_sync::*; +use crate::auxiliary::sample_types::*; +use crate::*; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; use flutter_rust_bridge::{Handler, IntoIntoDart}; @@ -102,7 +104,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_auto_opaque = RustAutoOpaqueNom, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.3.0"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1810234069; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -1683013433; // Section: executor @@ -7125,6 +7127,37 @@ fn wire__crate__api__misc_no_twin_example_a__struct_with_impl_block_in_another_f }, ) } +fn wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "struct_with_rust_auto_opaque_field_with_many_derive_default", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { move |context| { + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_,()>::Ok(crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive::default())?; Ok(output_ok) + })()) + } }) +} +fn wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "struct_with_rust_auto_opaque_field_with_many_derive_f", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| { + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_,()>::Ok({ crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive::f(&api_that); })?; Ok(output_ok) + })()) + } }) +} +fn wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "struct_with_rust_auto_opaque_with_non_clone_data_f", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| { + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_,()>::Ok({ crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData::f(&api_that); })?; Ok(output_ok) + })()) + } }) +} fn wire__crate__api__misc_no_twin_example_b__StructInMiscNoTwinExampleB_get_struct_in_misc_no_twin_example_a_impl( port_: flutter_rust_bridge::for_generated::MessagePort, that: impl CstDecode< @@ -48171,6 +48204,16 @@ impl SseDecode for RustAutoOpaqueNom { } } +impl SseDecode for RustAutoOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = , + >>::sse_decode(deserializer); + return flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_decode(inner); + } +} + impl SseDecode for RustAutoOpaqueMoi { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -48303,6 +48346,16 @@ impl SseDecode for RustAutoOpaqueNom { } } +impl SseDecode for RustAutoOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = , + >>::sse_decode(deserializer); + return flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_decode(inner); + } +} + impl SseDecode for RustAutoOpaqueNom { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -51906,6 +51959,16 @@ impl SseDecode } } +impl SseDecode + for RustOpaqueNom> +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + impl SseDecode for RustOpaqueMoi< flutter_rust_bridge::for_generated::RustAutoOpaqueInner, @@ -52574,6 +52637,14 @@ impl SseDecode } } +impl SseDecode for RustOpaqueNom> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + impl SseDecode for RustOpaqueNom< flutter_rust_bridge::for_generated::RustAutoOpaqueInner, @@ -67503,6 +67574,26 @@ impl SseDecode } } +impl SseDecode for crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_content = >::sse_decode(deserializer); + return crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive { + content: var_content, + }; + } +} + +impl SseDecode for crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_content = >::sse_decode(deserializer); + return crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData { + content: var_content, + }; + } +} + impl SseDecode for crate::api::structure::StructWithTwoFieldTwinNormal { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -83724,6 +83815,52 @@ impl } } // Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.content.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive, + > for crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive +{ + fn into_into_dart( + self, + ) -> crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.content.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData, + > for crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData +{ + fn into_into_dart( + self, + ) -> crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::api::structure::StructWithTwoFieldTwinNormal { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ @@ -85450,6 +85587,13 @@ impl SseEncode for RustAutoOpaqueNom { } } +impl SseEncode for RustAutoOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>::sse_encode(flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_encode(self), serializer); + } +} + impl SseEncode for RustAutoOpaqueMoi { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -85608,6 +85752,13 @@ impl SseEncode for RustAutoOpaqueNom { } } +impl SseEncode for RustAutoOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>::sse_encode(flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_encode(self), serializer); + } +} + impl SseEncode for RustAutoOpaqueNom { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -89538,6 +89689,17 @@ impl SseEncode } } +impl SseEncode + for RustOpaqueNom> +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + impl SseEncode for RustOpaqueMoi< flutter_rust_bridge::for_generated::RustAutoOpaqueInner, @@ -90264,6 +90426,15 @@ impl SseEncode } } +impl SseEncode for RustOpaqueNom> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + impl SseEncode for RustOpaqueNom< flutter_rust_bridge::for_generated::RustAutoOpaqueInner, @@ -102572,6 +102743,20 @@ impl SseEncode } } +impl SseEncode for crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.content, serializer); + } +} + +impl SseEncode for crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.content, serializer); + } +} + impl SseEncode for crate::api::structure::StructWithTwoFieldTwinNormal { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -103619,6 +103804,8 @@ mod io { use crate::api::rust_auto_opaque::*; use crate::api::rust_opaque::*; use crate::api::rust_opaque_sync::*; + use crate::auxiliary::sample_types::*; + use crate::*; use flutter_rust_bridge::for_generated::byteorder::{ NativeEndian, ReadBytesExt, WriteBytesExt, }; @@ -103647,6 +103834,12 @@ mod io { flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_decode(self.cst_decode()) } } + impl CstDecode> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustAutoOpaqueNom { + flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_decode(self.cst_decode()) + } + } impl CstDecode> for usize { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> RustAutoOpaqueMoi { @@ -103689,6 +103882,12 @@ mod io { flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_decode(self.cst_decode()) } } + impl CstDecode> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustAutoOpaqueNom { + flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_decode(self.cst_decode()) + } + } impl CstDecode> for usize { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> RustAutoOpaqueNom { @@ -106147,6 +106346,19 @@ mod io { unsafe { decode_rust_opaque_nom(self as _) } } } + impl + CstDecode< + RustOpaqueNom>, + > for usize + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom> + { + unsafe { decode_rust_opaque_nom(self as _) } + } + } impl CstDecode< RustOpaqueMoi< @@ -106662,6 +106874,17 @@ mod io { unsafe { decode_rust_opaque_nom(self as _) } } } + impl CstDecode>> + for usize + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom> + { + unsafe { decode_rust_opaque_nom(self as _) } + } + } impl CstDecode< RustOpaqueNom< @@ -110472,6 +110695,32 @@ mod io { CstDecode::::cst_decode(*wrap).into() } } + impl CstDecode + for *mut wire_cst_struct_with_rust_auto_opaque_field_with_many_derive + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive + { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::< + crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive, + >::cst_decode(*wrap) + .into() + } + } + impl CstDecode + for *mut wire_cst_struct_with_rust_auto_opaque_with_non_clone_data + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } impl CstDecode for *mut wire_cst_struct_with_two_field_twin_normal { @@ -116466,6 +116715,31 @@ mod io { } } } + impl CstDecode + for wire_cst_struct_with_rust_auto_opaque_field_with_many_derive + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive + { + crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive { + content: self.content.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_struct_with_rust_auto_opaque_with_non_clone_data + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData { + crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData { + content: self.content.cst_decode(), + } + } + } impl CstDecode for wire_cst_struct_with_two_field_twin_normal { @@ -120872,6 +121146,30 @@ field1: Default::default(), } Self::new_with_null_ptr() } } + impl NewWithNullPtr for wire_cst_struct_with_rust_auto_opaque_field_with_many_derive { + fn new_with_null_ptr() -> Self { + Self { + content: Default::default(), + } + } + } + impl Default for wire_cst_struct_with_rust_auto_opaque_field_with_many_derive { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_struct_with_rust_auto_opaque_with_non_clone_data { + fn new_with_null_ptr() -> Self { + Self { + content: Default::default(), + } + } + } + impl Default for wire_cst_struct_with_rust_auto_opaque_with_non_clone_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } impl NewWithNullPtr for wire_cst_struct_with_two_field_twin_normal { fn new_with_null_ptr() -> Self { Self { @@ -123724,6 +124022,29 @@ field1: Default::default(), } ) } + #[no_mangle] + pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default( + port_: i64, + ) { + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f( + port_: i64, + that: *mut wire_cst_struct_with_rust_auto_opaque_field_with_many_derive, + ) { + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f( + port_: i64, + that: *mut wire_cst_struct_with_rust_auto_opaque_with_non_clone_data, + ) { + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f_impl(port_, that) + } + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__misc_no_twin_example_b__StructInMiscNoTwinExampleB_get_struct_in_misc_no_twin_example_a( port_: i64, @@ -149143,6 +149464,24 @@ field1: Default::default(), } } } + #[no_mangle] + pub extern "C" fn frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::increment_strong_count(ptr as _); + } + } + + #[no_mangle] + pub extern "C" fn frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::decrement_strong_count(ptr as _); + } + } + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( ptr: *const std::ffi::c_void, @@ -150271,6 +150610,24 @@ field1: Default::default(), } } } + #[no_mangle] + pub extern "C" fn frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::increment_strong_count(ptr as _); + } + } + + #[no_mangle] + pub extern "C" fn frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::decrement_strong_count(ptr as _); + } + } + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( ptr: *const std::ffi::c_void, @@ -152641,6 +152998,22 @@ field1: Default::default(), } ) } + #[no_mangle] + pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_rust_auto_opaque_field_with_many_derive( + ) -> *mut wire_cst_struct_with_rust_auto_opaque_field_with_many_derive { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_struct_with_rust_auto_opaque_field_with_many_derive::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_rust_auto_opaque_with_non_clone_data( + ) -> *mut wire_cst_struct_with_rust_auto_opaque_with_non_clone_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_struct_with_rust_auto_opaque_with_non_clone_data::new_with_null_ptr(), + ) + } + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_two_field_twin_normal( ) -> *mut wire_cst_struct_with_two_field_twin_normal { @@ -158831,6 +159204,16 @@ items: *mut wire_cst_list_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generat } #[repr(C)] #[derive(Clone, Copy)] + pub struct wire_cst_struct_with_rust_auto_opaque_field_with_many_derive { + content: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_struct_with_rust_auto_opaque_with_non_clone_data { + content: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct wire_cst_struct_with_two_field_twin_normal { a: i32, b: i32, @@ -159105,6 +159488,8 @@ mod web { use crate::api::rust_auto_opaque::*; use crate::api::rust_opaque::*; use crate::api::rust_opaque_sync::*; + use crate::auxiliary::sample_types::*; + use crate::*; use flutter_rust_bridge::for_generated::byteorder::{ NativeEndian, ReadBytesExt, WriteBytesExt, }; @@ -167197,6 +167582,49 @@ mod web { } } } + impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive + { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueFieldWithManyDerive { + content: self_.get(0).cst_decode(), + } + } + } + impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::misc_no_twin_example_a::StructWithRustAutoOpaqueWithNonCloneData { + content: self_.get(0).cst_decode(), + } + } + } impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -167870,6 +168298,14 @@ mod web { flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_decode(self.cst_decode()) } } + impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustAutoOpaqueNom { + flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_decode(self.cst_decode()) + } + } impl CstDecode> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -167926,6 +168362,14 @@ mod web { flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_decode(self.cst_decode()) } } + impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustAutoOpaqueNom { + flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_decode(self.cst_decode()) + } + } impl CstDecode> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -170930,6 +171374,23 @@ mod web { unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } } } + impl + CstDecode< + RustOpaqueNom>, + > for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom> + { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } + } impl CstDecode< RustOpaqueMoi< @@ -171569,6 +172030,21 @@ mod web { unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } } } + impl CstDecode>> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom> + { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } + } impl CstDecode< RustOpaqueNom< @@ -176038,6 +176514,29 @@ mod web { ) } + #[wasm_bindgen] + pub fn wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default( + port_: flutter_rust_bridge::for_generated::MessagePort, + ) { + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_default_impl(port_) + } + + #[wasm_bindgen] + pub fn wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + ) { + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_field_with_many_derive_f_impl(port_, that) + } + + #[wasm_bindgen] + pub fn wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + ) { + wire__crate__api__misc_no_twin_example_a__struct_with_rust_auto_opaque_with_non_clone_data_f_impl(port_, that) + } + #[wasm_bindgen] pub fn wire__crate__api__misc_no_twin_example_b__StructInMiscNoTwinExampleB_get_struct_in_misc_no_twin_example_a( port_: flutter_rust_bridge::for_generated::MessagePort, @@ -201457,6 +201956,24 @@ mod web { } } + #[wasm_bindgen] + pub fn rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::increment_strong_count(ptr as _); + } + } + + #[wasm_bindgen] + pub fn rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneDataRaw( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::decrement_strong_count(ptr as _); + } + } + #[wasm_bindgen] pub fn rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinMoi( ptr: *const std::ffi::c_void, @@ -202585,6 +203102,24 @@ mod web { } } + #[wasm_bindgen] + pub fn rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::increment_strong_count(ptr as _); + } + } + + #[wasm_bindgen] + pub fn rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerString( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::decrement_strong_count(ptr as _); + } + } + #[wasm_bindgen] pub fn rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructInMiscNoTwinExampleA( ptr: *const std::ffi::c_void,