From ac60335a22903f93358b5e7fbba87a7df2cb9418 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 11:53:52 +0800 Subject: [PATCH 01/36] Revert "Revert "feat: demo"" This reverts commit 8a3d44fb36a0cbcf50d219deb7170f7a5cbab25b. --- frb_example/dart_minimal/rust/src/api/minimal.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frb_example/dart_minimal/rust/src/api/minimal.rs b/frb_example/dart_minimal/rust/src/api/minimal.rs index 517e29973f..d7e15c80f0 100644 --- a/frb_example/dart_minimal/rust/src/api/minimal.rs +++ b/frb_example/dart_minimal/rust/src/api/minimal.rs @@ -8,3 +8,14 @@ pub fn init_app() { pub fn minimal_adder(a: i32, b: i32) -> i32 { a + b } + +pub struct StructWithFieldRenameTwinNormal { + #[frb(name = "renamed_field")] + class: i32, +} + +pub fn func_for_struct_with_field_rename_twin_normal( + arg: StructWithFieldRenameTwinNormal, +) -> StructWithFieldRenameTwinNormal { + arg +} From dc3c93ea072b42b06d9a90820681d804cca0eb72 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 11:53:52 +0800 Subject: [PATCH 02/36] Revert "Revert "chore: more"" This reverts commit 6c283812d63a219ac664aa22e54d3b09d1cf183b. --- frb_example/dart_minimal/rust/src/api/minimal.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/frb_example/dart_minimal/rust/src/api/minimal.rs b/frb_example/dart_minimal/rust/src/api/minimal.rs index d7e15c80f0..cd1e4f2d5c 100644 --- a/frb_example/dart_minimal/rust/src/api/minimal.rs +++ b/frb_example/dart_minimal/rust/src/api/minimal.rs @@ -9,6 +9,7 @@ pub fn minimal_adder(a: i32, b: i32) -> i32 { a + b } +#[frb] pub struct StructWithFieldRenameTwinNormal { #[frb(name = "renamed_field")] class: i32, From b3693c04dc2838253e46029688d0c2dcdcb1fc4a Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 12:09:02 +0800 Subject: [PATCH 03/36] chore: lint --- .../src/library/codegen/parser/mir/parser/attribute.rs | 8 ++++++-- frb_codegen/src/library/codegen/parser/mir/parser/mod.rs | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/attribute.rs b/frb_codegen/src/library/codegen/parser/mir/parser/attribute.rs index c5a89a0d40..149fb12540 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/attribute.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/attribute.rs @@ -189,13 +189,17 @@ impl FrbAttributes { pub(crate) fn dart2rust(&self) -> Option { (self.0.iter()) - .filter_map(|item| if_then_some!(let FrbAttribute::Dart2Rust(inner) = item, inner.clone())) + .filter_map( + |item| if_then_some!(let FrbAttribute::Dart2Rust(inner) = item, inner.clone()), + ) .next() } pub(crate) fn rust2dart(&self) -> Option { (self.0.iter()) - .filter_map(|item| if_then_some!(let FrbAttribute::Rust2Dart(inner) = item, inner.clone())) + .filter_map( + |item| if_then_some!(let FrbAttribute::Rust2Dart(inner) = item, inner.clone()), + ) .next() } } diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/mod.rs b/frb_codegen/src/library/codegen/parser/mir/parser/mod.rs index 981d88fe9e..6be1821ddc 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/mod.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/mod.rs @@ -39,9 +39,11 @@ pub(crate) fn parse( default_stream_sink_codec: config.default_stream_sink_codec, default_rust_opaque_codec: config.default_rust_opaque_codec, parse_mode, - } + }, )?; - type_parser.custom_ser_des_infos.extend(custom_ser_des_infos); + type_parser + .custom_ser_des_infos + .extend(custom_ser_des_infos); let (funcs_all, skipped_functions) = function::parse( config, From 7a8d14f747890e0490ff382a1471fd395285e2e7 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 13:56:14 +0800 Subject: [PATCH 04/36] feat: ir --- frb_codegen/src/library/codegen/ir/mir/field.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/frb_codegen/src/library/codegen/ir/mir/field.rs b/frb_codegen/src/library/codegen/ir/mir/field.rs index f77908a9ec..b5ec63505b 100644 --- a/frb_codegen/src/library/codegen/ir/mir/field.rs +++ b/frb_codegen/src/library/codegen/ir/mir/field.rs @@ -8,6 +8,7 @@ crate::mir! { pub struct MirField { pub ty: MirType, pub name: MirIdent, + pub dart_name: Option, pub is_final: bool, pub is_rust_public: Option, pub comments: Vec, From 4d4cc6d7421cfdc02afbdeccb9670dca32a33e46 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 13:57:03 +0800 Subject: [PATCH 05/36] chore: write --- .../codegen/parser/mir/parser/function/auto_accessor/field.rs | 1 + .../library/codegen/parser/mir/parser/function/real/argument.rs | 1 + .../src/library/codegen/parser/mir/parser/ty/enumeration.rs | 1 + .../src/library/codegen/parser/mir/parser/ty/structure.rs | 1 + frb_codegen/src/library/codegen/parser/mir/parser/ty/tuple.rs | 1 + 5 files changed, 5 insertions(+) diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs b/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs index 16586a6a7f..6be7665b9d 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs @@ -133,6 +133,7 @@ fn create_mir_field(ty: MirType, name: &str) -> MirField { MirField { ty, name: MirIdent::new(name.to_owned()), + dart_name: None, is_final: true, is_rust_public: None, comments: vec![], diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/function/real/argument.rs b/frb_codegen/src/library/codegen/parser/mir/parser/function/real/argument.rs index 64acc91ff6..62de4beeb8 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/function/real/argument.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/function/real/argument.rs @@ -77,6 +77,7 @@ impl<'a, 'b> FunctionParser<'a, 'b> { comments: parse_comments(attrs), default: attributes.default_value(), settings: MirFieldSettings::default(), + dart_name: None, }, ownership_mode, }], diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs b/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs index 9c5109a5e5..3d71d8b5f1 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs @@ -129,6 +129,7 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { settings: MirFieldSettings { is_in_mirrored_enum: src_enum.mirror, }, + dart_name: TODO, }) }) .collect::>>()?, diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs b/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs index 73aa85d522..9264ee7563 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs @@ -91,6 +91,7 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { comments: parse_comments(&field.attrs), default: attributes.default_value(), settings: MirFieldSettings::default(), + dart_name: TODO, }) } } diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/ty/tuple.rs b/frb_codegen/src/library/codegen/parser/mir/parser/ty/tuple.rs index 4282833043..703af764dc 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/ty/tuple.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/ty/tuple.rs @@ -50,6 +50,7 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { .map(|(idx, ty)| MirField { ty: ty.clone(), name: MirIdent::new(format!("field{idx}")), + dart_name: None, is_final: true, is_rust_public: None, comments: vec![], From f0d0678268dbd67fbb33985a072602ac5e3020b9 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 13:57:28 +0800 Subject: [PATCH 06/36] feat: more --- .../src/library/codegen/parser/mir/parser/ty/enumeration.rs | 2 +- .../src/library/codegen/parser/mir/parser/ty/structure.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs b/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs index 3d71d8b5f1..b2ba69d1e1 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs @@ -129,7 +129,7 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { settings: MirFieldSettings { is_in_mirrored_enum: src_enum.mirror, }, - dart_name: TODO, + dart_name: None, }) }) .collect::>>()?, diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs b/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs index 9264ee7563..396e69e9dd 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs @@ -91,7 +91,7 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { comments: parse_comments(&field.attrs), default: attributes.default_value(), settings: MirFieldSettings::default(), - dart_name: TODO, + dart_name: attributes.name(), }) } } From 9b72c6117ae7fbee3acc8fe770ef49c74d2f9ada Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:05:31 +0800 Subject: [PATCH 07/36] refactor: extract --- frb_codegen/src/library/codegen/ir/mir/ident.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index 01753e8c75..763034c730 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -22,7 +22,7 @@ impl MirIdent { } pub fn dart_style(&self) -> String { - (self.raw.strip_prefix("r#").unwrap_or(self.raw.as_str())).to_case(Case::Camel) + convert_rust_to_dart_style(&self.raw) } pub fn style(&self, lang: &Lang) -> String { @@ -56,3 +56,7 @@ fn convert_rust_to_c_style(raw: &str) -> String { ans } + +fn convert_rust_to_dart_style(raw: &str) -> String { + (raw.strip_prefix("r#").unwrap_or(raw)).to_case(Case::Camel) +} From 63b29845da5a24a5b5a096b953936585ad4f1c55 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:05:58 +0800 Subject: [PATCH 08/36] chore: pub --- frb_codegen/src/library/codegen/ir/mir/ident.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index 763034c730..418731c681 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -4,7 +4,7 @@ use convert_case::{Case, Casing}; crate::mir! { #[serde(transparent)] pub struct MirIdent { - pub raw: String, + raw: String, } } From c7e0d18f62e831f533ae59a8f4d0f301f50653a9 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:07:28 +0800 Subject: [PATCH 09/36] feat: private field --- .../spec_generator/class/ty/enumeration_complex.rs | 2 +- .../wire/rust/spec_generator/misc/ty/structure.rs | 2 +- .../parser/mir/parser/function/auto_accessor/field.rs | 8 ++++---- .../library/codegen/parser/mir/parser/ty/enumeration.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_complex.rs b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_complex.rs index fe968b5377..85cc0f96f4 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_complex.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_complex.rs @@ -130,7 +130,7 @@ impl<'a> EnumRefApiDartGenerator<'a> { fn generate_implements_exception(&self, variant: &MirEnumVariant) -> &str { let has_backtrace = matches!(&variant.kind, - MirVariantKind::Struct(MirStruct {is_fields_named: true, fields, ..}) if fields.iter().any(|field| field.name.raw == BACKTRACE_IDENT)); + MirVariantKind::Struct(MirStruct {is_fields_named: true, fields, ..}) if fields.iter().any(|field| field.name.rust_style() == BACKTRACE_IDENT)); if self.mir.is_exception && has_backtrace { "@Implements()" } else { diff --git a/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/misc/ty/structure.rs b/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/misc/ty/structure.rs index 394e8463fa..e28afe1a27 100644 --- a/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/misc/ty/structure.rs +++ b/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/misc/ty/structure.rs @@ -26,7 +26,7 @@ impl<'a> WireRustGeneratorMiscTrait for StructRefWireRustGenerator<'a> { .enumerate() .map(|(i, field)| { let field_access = if src.is_fields_named { - field.name.raw.clone() + field.name.rust_style().to_owned() } else { i.to_string() }; diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs b/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs index 6be7665b9d..9eb741e53e 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs @@ -28,12 +28,12 @@ pub(super) fn parse_auto_accessor_of_field( type_parser: &mut TypeParser, context: &TypeParserParsingContext, ) -> anyhow::Result { - let rust_method_name = format!("{}_{}", accessor_mode.verb_str(), field.name.raw); + let rust_method_name = format!("{}_{}", accessor_mode.verb_str(), field.name.rust_style()); let owner = MirFuncOwnerInfoMethod { owner_ty: ty_direct_parse.to_owned(), actual_method_name: rust_method_name, - actual_method_dart_name: Some(field.name.raw.clone()), + actual_method_dart_name: Some(field.name.rust_style().to_owned()), mode: MirFuncOwnerInfoMethodMode::Instance, trait_def: None, }; @@ -47,7 +47,7 @@ pub(super) fn parse_auto_accessor_of_field( if accessor_mode == MirFuncAccessorMode::Setter { inputs.push(MirFuncInput { ownership_mode: None, - inner: create_mir_field(field.ty.clone(), &field.name.raw), + inner: create_mir_field(field.ty.clone(), &field.name.rust_style()), }); } @@ -124,7 +124,7 @@ fn compute_self_arg( fn compute_src_lineno_pseudo(struct_name: &NamespacedName, field: &MirField) -> usize { let mut hasher = Sha1::new(); hasher.update(struct_name.rust_style().as_bytes()); - hasher.update(field.name.raw.as_bytes()); + hasher.update(field.name.rust_style().as_bytes()); let digest = hasher.finalize(); usize::from_le_bytes(digest[..8].try_into().unwrap()) } diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs b/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs index b2ba69d1e1..70e4c14718 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs @@ -142,7 +142,7 @@ pub(crate) fn compute_enum_variant_kind_struct_name( variant_name: &MirIdent, ) -> NamespacedName { let variant_namespace = enum_name.namespace.join(&enum_name.name); - NamespacedName::new(variant_namespace, variant_name.raw.clone()) + NamespacedName::new(variant_namespace, variant_name.rust_style().to_owned()) } struct EnumOrStructParserEnum<'a, 'b, 'c, 'd>(&'d mut TypeParserWithContext<'a, 'b, 'c>); From d81801424acd8f27c2bffc43052a6e91f9499c9d Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:07:45 +0800 Subject: [PATCH 10/36] chore: ty --- .../wire/rust/spec_generator/misc/function/lockable.rs | 2 +- frb_codegen/src/library/codegen/ir/mir/ident.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/misc/function/lockable.rs b/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/misc/function/lockable.rs index f4cbde389f..d9c2ce8221 100644 --- a/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/misc/function/lockable.rs +++ b/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/misc/function/lockable.rs @@ -78,7 +78,7 @@ fn generate_decode_statement( ) } -fn get_variable_name(field: &MirFuncInput) -> &str { +fn get_variable_name(field: &MirFuncInput) -> String { field.inner.name.rust_style() } diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index 418731c681..e0988f05e6 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -13,8 +13,8 @@ impl MirIdent { MirIdent { raw } } - pub fn rust_style(&self) -> &str { - &self.raw + pub fn rust_style(&self) -> String { + self.raw.clone() } pub fn c_style(&self) -> String { From b3736d276cba36d9185a2d4ca2027b4d43474339 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:08:37 +0800 Subject: [PATCH 11/36] chore: rename --- frb_codegen/src/library/codegen/ir/mir/ident.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index e0988f05e6..0bfcdbc323 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -4,25 +4,25 @@ use convert_case::{Case, Casing}; crate::mir! { #[serde(transparent)] pub struct MirIdent { - raw: String, + rust_style: String, } } impl MirIdent { pub fn new(raw: String) -> MirIdent { - MirIdent { raw } + MirIdent { rust_style: raw } } pub fn rust_style(&self) -> String { - self.raw.clone() + self.rust_style.clone() } pub fn c_style(&self) -> String { - convert_rust_to_c_style(&self.raw) + convert_rust_to_c_style(&self.rust_style) } pub fn dart_style(&self) -> String { - convert_rust_to_dart_style(&self.raw) + convert_rust_to_dart_style(&self.rust_style) } pub fn style(&self, lang: &Lang) -> String { @@ -35,7 +35,7 @@ impl MirIdent { impl std::fmt::Display for MirIdent { fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { - fmt.write_str(&self.raw) + fmt.write_str(&self.rust_style) } } From daae3fb976b65a4bb2ee1d7d1e4fc328d17d9696 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:10:03 +0800 Subject: [PATCH 12/36] chore: ctor --- frb_codegen/src/library/codegen/ir/mir/ident.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index 0bfcdbc323..e60a528099 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -1,16 +1,20 @@ use crate::codegen::generator::codec::sse::lang::Lang; use crate::utils::cbindgen_keywords; use convert_case::{Case, Casing}; + crate::mir! { -#[serde(transparent)] pub struct MirIdent { rust_style: String, + dart_style: Option, } } impl MirIdent { - pub fn new(raw: String) -> MirIdent { - MirIdent { rust_style: raw } + pub fn new(rust_style: String, dart_style: Option) -> MirIdent { + MirIdent { + rust_style, + dart_style, + } } pub fn rust_style(&self) -> String { From 67422706cd19a5b0887a5b70fb3bc38a7ae1216a Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:11:17 +0800 Subject: [PATCH 13/36] feat: mv inside --- .../parser/mir/parser/function/auto_accessor/field.rs | 3 +-- .../codegen/parser/mir/parser/function/real/argument.rs | 3 +-- .../src/library/codegen/parser/mir/parser/ty/enumeration.rs | 6 +++--- .../src/library/codegen/parser/mir/parser/ty/structure.rs | 3 +-- .../src/library/codegen/parser/mir/parser/ty/tuple.rs | 3 +-- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs b/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs index 9eb741e53e..116122e6d8 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/function/auto_accessor/field.rs @@ -132,8 +132,7 @@ fn compute_src_lineno_pseudo(struct_name: &NamespacedName, field: &MirField) -> fn create_mir_field(ty: MirType, name: &str) -> MirField { MirField { ty, - name: MirIdent::new(name.to_owned()), - dart_name: None, + name: MirIdent::new(name.to_owned(), None), is_final: true, is_rust_public: None, comments: vec![], diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/function/real/argument.rs b/frb_codegen/src/library/codegen/parser/mir/parser/function/real/argument.rs index 62de4beeb8..0e97a7dfa5 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/function/real/argument.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/function/real/argument.rs @@ -70,14 +70,13 @@ impl<'a, 'b> FunctionParser<'a, 'b> { Ok(FunctionPartialInfo { inputs: vec![MirFuncInput { inner: MirField { - name: MirIdent::new(name), + name: MirIdent::new(name, None), ty, is_final: true, is_rust_public: None, comments: parse_comments(attrs), default: attributes.default_value(), settings: MirFieldSettings::default(), - dart_name: None, }, ownership_mode, }], diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs b/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs index 70e4c14718..c62f09e84f 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/ty/enumeration.rs @@ -66,10 +66,10 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { src_enum: &HirFlatEnum, variant: &Variant, ) -> anyhow::Result { - let variant_name = MirIdent::new(variant.ident.to_string()); + let variant_name = MirIdent::new(variant.ident.to_string(), None); Ok(MirEnumVariant { name: variant_name.clone(), - wrapper_name: MirIdent::new(format!("{}_{}", src_enum.name.name, variant.ident)), + wrapper_name: MirIdent::new(format!("{}_{}", src_enum.name.name, variant.ident), None), comments: parse_comments(&variant.attrs), kind: match variant.fields.iter().next() { None => MirVariantKind::Value, @@ -118,6 +118,7 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { .as_ref() .map(ToString::to_string) .unwrap_or_else(|| format!("field{idx}")), + None, ), ty: self.parse_type_with_context(&field.ty, |c| { c.with_struct_or_enum_attributes(attributes.clone()) @@ -129,7 +130,6 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { settings: MirFieldSettings { is_in_mirrored_enum: src_enum.mirror, }, - dart_name: None, }) }) .collect::>>()?, diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs b/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs index 396e69e9dd..923513837e 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/ty/structure.rs @@ -84,14 +84,13 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { })?; let attributes = FrbAttributes::parse(&field.attrs)?; Ok(MirField { - name: MirIdent::new(field_name), + name: MirIdent::new(field_name, attributes.name()), ty: field_type, is_final: !attributes.non_final(), is_rust_public: Some(matches!(field.vis, Visibility::Public(_))), comments: parse_comments(&field.attrs), default: attributes.default_value(), settings: MirFieldSettings::default(), - dart_name: attributes.name(), }) } } diff --git a/frb_codegen/src/library/codegen/parser/mir/parser/ty/tuple.rs b/frb_codegen/src/library/codegen/parser/mir/parser/ty/tuple.rs index 703af764dc..a0a40bc7e2 100644 --- a/frb_codegen/src/library/codegen/parser/mir/parser/ty/tuple.rs +++ b/frb_codegen/src/library/codegen/parser/mir/parser/ty/tuple.rs @@ -49,8 +49,7 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { .enumerate() .map(|(idx, ty)| MirField { ty: ty.clone(), - name: MirIdent::new(format!("field{idx}")), - dart_name: None, + name: MirIdent::new(format!("field{idx}"), None), is_final: true, is_rust_public: None, comments: vec![], From 07d1b83e55d9b7f91dbead9a4a1a0e1dce978d68 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:11:22 +0800 Subject: [PATCH 14/36] chore: rm --- frb_codegen/src/library/codegen/ir/mir/field.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/ir/mir/field.rs b/frb_codegen/src/library/codegen/ir/mir/field.rs index b5ec63505b..f77908a9ec 100644 --- a/frb_codegen/src/library/codegen/ir/mir/field.rs +++ b/frb_codegen/src/library/codegen/ir/mir/field.rs @@ -8,7 +8,6 @@ crate::mir! { pub struct MirField { pub ty: MirType, pub name: MirIdent, - pub dart_name: Option, pub is_final: bool, pub is_rust_public: Option, pub comments: Vec, From 3a078e1070c4220828b22ff95e46122309577199 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:12:04 +0800 Subject: [PATCH 15/36] chore: fmt --- frb_codegen/src/library/codegen/ir/mir/ident.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index e60a528099..9880e42750 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -39,7 +39,11 @@ impl MirIdent { impl std::fmt::Display for MirIdent { fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { - fmt.write_str(&self.rust_style) + fmt.write_str(&self.rust_style)?; + if let Some(dart_style) = &self.dart_style { + write!(fmt, "(dart_style={})", dart_style)?; + } + Ok(()) } } From c33cf8280f459b40be78466b684d7466bf3d5dcb Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:13:59 +0800 Subject: [PATCH 16/36] chore: codegen --- .../dart_minimal/flutter_rust_bridge.yaml | 2 +- frb_example/dart_minimal/frb_generated.h | 40 +- .../lib/src/rust/api/minimal.dart | 32 +- .../lib/src/rust/frb_generated.dart | 369 ++++++++++-------- .../lib/src/rust/frb_generated.io.dart | 209 ++++++++-- .../lib/src/rust/frb_generated.web.dart | 93 +++-- .../dart_minimal/rust/src/frb_generated.io.rs | 70 ++++ .../dart_minimal/rust/src/frb_generated.rs | 111 ++++-- .../rust/src/frb_generated.web.rs | 50 +++ 9 files changed, 711 insertions(+), 265 deletions(-) diff --git a/frb_example/dart_minimal/flutter_rust_bridge.yaml b/frb_example/dart_minimal/flutter_rust_bridge.yaml index feb59b4f86..c6adde6f5f 100644 --- a/frb_example/dart_minimal/flutter_rust_bridge.yaml +++ b/frb_example/dart_minimal/flutter_rust_bridge.yaml @@ -6,4 +6,4 @@ dump_all: true local: true # TODO temp -#full_dep: true +full_dep: true diff --git a/frb_example/dart_minimal/frb_generated.h b/frb_example/dart_minimal/frb_generated.h index ad87ade833..a6e9c7ffe1 100644 --- a/frb_example/dart_minimal/frb_generated.h +++ b/frb_example/dart_minimal/frb_generated.h @@ -1 +1,39 @@ -// Nothing when using full_dep=false mode \ No newline at end of file +#include +#include +#include +// EXTRA BEGIN +typedef struct DartCObject *WireSyncRust2DartDco; +typedef struct WireSyncRust2DartSse { + uint8_t *ptr; + int32_t len; +} WireSyncRust2DartSse; + +typedef int64_t DartPort; +typedef bool (*DartPostCObjectFnType)(DartPort port_id, void *message); +void store_dart_post_cobject(DartPostCObjectFnType ptr); +// EXTRA END +typedef struct _Dart_Handle* Dart_Handle; + +typedef struct wire_cst_struct_with_field_rename_twin_normal { + int32_t class_; +} wire_cst_struct_with_field_rename_twin_normal; + +void frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal(int64_t port_, + struct wire_cst_struct_with_field_rename_twin_normal *arg); + +void frbgen_frb_example_dart_minimal_wire__crate__api__minimal__init_app(int64_t port_); + +void frbgen_frb_example_dart_minimal_wire__crate__api__minimal__minimal_adder(int64_t port_, + int32_t a, + int32_t b); + +struct wire_cst_struct_with_field_rename_twin_normal *frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_field_rename_twin_normal(void); +static int64_t dummy_method_to_enforce_bundling(void) { + int64_t dummy_var = 0; + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_field_rename_twin_normal); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_wire__crate__api__minimal__init_app); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_wire__crate__api__minimal__minimal_adder); + dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); + return dummy_var; +} diff --git a/frb_example/dart_minimal/lib/src/rust/api/minimal.dart b/frb_example/dart_minimal/lib/src/rust/api/minimal.dart index 5a3ada18f9..c1fade1d2c 100644 --- a/frb_example/dart_minimal/lib/src/rust/api/minimal.dart +++ b/frb_example/dart_minimal/lib/src/rust/api/minimal.dart @@ -6,5 +6,33 @@ import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -Future minimalAdder({required int a, required int b}) => - RustLib.instance.api.crateApiMinimalMinimalAdder(a: a, b: b); + + + + Future minimalAdder({required int a , required int b }) => RustLib.instance.api.crateApiMinimalMinimalAdder(a: a, b: b); + +Future funcForStructWithFieldRenameTwinNormal({required StructWithFieldRenameTwinNormal arg }) => RustLib.instance.api.crateApiMinimalFuncForStructWithFieldRenameTwinNormal(arg: arg); + + class StructWithFieldRenameTwinNormal { + final int class; + + const StructWithFieldRenameTwinNormal({required this.class ,}); + + + + + + @override + int get hashCode => class.hashCode; + + + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithFieldRenameTwinNormal && + runtimeType == other.runtimeType + && class == other.class; + + } + \ No newline at end of file diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.dart index ae3e06b17a..ce2184d6ba 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.dart @@ -10,169 +10,206 @@ import 'frb_generated.dart'; import 'frb_generated.io.dart' if (dart.library.html) 'frb_generated.web.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -/// Main entrypoint of the Rust API -class RustLib extends BaseEntrypoint { - @internal - static final instance = RustLib._(); - - RustLib._(); - - /// Initialize flutter_rust_bridge - static Future init({ - RustLibApi? api, - BaseHandler? handler, - ExternalLibrary? externalLibrary, - }) async { - await instance.initImpl( - api: api, - handler: handler, - externalLibrary: externalLibrary, - ); - } - - /// Dispose flutter_rust_bridge - /// - /// The call to this function is optional, since flutter_rust_bridge (and everything else) - /// is automatically disposed when the app stops. - static void dispose() => instance.disposeImpl(); - - @override - ApiImplConstructor get apiImplConstructor => - RustLibApiImpl.new; - - @override - WireConstructor get wireConstructor => - RustLibWire.fromExternalLibrary; - - @override - Future executeRustInitializers() async { - await api.crateApiMinimalInitApp(); - } - - @override - ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => - kDefaultExternalLibraryLoaderConfig; - - @override - String get codegenVersion => '2.0.0-dev.38'; - - @override - int get rustContentHash => -2119384465; - - static const kDefaultExternalLibraryLoaderConfig = - ExternalLibraryLoaderConfig( - stem: 'frb_example_dart_minimal', - ioDirectory: 'rust/target/release/', - webPrefix: 'pkg/', - ); -} - -abstract class RustLibApi extends BaseApi { - Future crateApiMinimalInitApp(); - - Future crateApiMinimalMinimalAdder({required int a, required int b}); -} - -class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { - RustLibApiImpl({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, - }); - - @override - Future crateApiMinimalInitApp() { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - final serializer = SseSerializer(generalizedFrbRustBinding); - pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1, port: port_); - }, - codec: SseCodec( - decodeSuccessData: sse_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateApiMinimalInitAppConstMeta, - argValues: [], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMinimalInitAppConstMeta => const TaskConstMeta( - debugName: "init_app", - argNames: [], - ); - - @override - Future crateApiMinimalMinimalAdder({required int a, required int b}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_i_32(a, serializer); - sse_encode_i_32(b, serializer); - pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 2, port: port_); - }, - codec: SseCodec( - decodeSuccessData: sse_decode_i_32, - decodeErrorData: null, - ), - constMeta: kCrateApiMinimalMinimalAdderConstMeta, - argValues: [a, b], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMinimalMinimalAdderConstMeta => - const TaskConstMeta( - debugName: "minimal_adder", - argNames: ["a", "b"], - ); - - @protected - int dco_decode_i_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; - } - - @protected - void dco_decode_unit(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return; - } - - @protected - int sse_decode_i_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getInt32(); - } - - @protected - void sse_decode_unit(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - } - - @protected - bool sse_decode_bool(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint8() != 0; - } - - @protected - void sse_encode_i_32(int self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putInt32(self); - } - - @protected - void sse_encode_unit(void self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - } - - @protected - void sse_encode_bool(bool self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putUint8(self ? 1 : 0); - } -} + + /// Main entrypoint of the Rust API + class RustLib extends BaseEntrypoint { + @internal + static final instance = RustLib._(); + + RustLib._(); + + /// Initialize flutter_rust_bridge + static Future init({ + RustLibApi? api, + BaseHandler? handler, + ExternalLibrary? externalLibrary, + }) async { + await instance.initImpl( + api: api, + handler: handler, + externalLibrary: externalLibrary, + ); + } + + /// Dispose flutter_rust_bridge + /// + /// The call to this function is optional, since flutter_rust_bridge (and everything else) + /// is automatically disposed when the app stops. + static void dispose() => instance.disposeImpl(); + + @override + ApiImplConstructor get apiImplConstructor => RustLibApiImpl.new; + + @override + WireConstructor get wireConstructor => RustLibWire.fromExternalLibrary; + + @override + Future executeRustInitializers() async { + await api.crateApiMinimalInitApp(); + + } + + @override + ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; + + @override + String get codegenVersion => '2.0.0-dev.38'; + + @override + int get rustContentHash => 309815666; + + static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( + stem: 'frb_example_dart_minimal', + ioDirectory: 'rust/target/release/', + webPrefix: 'pkg/', + ); + } + + + abstract class RustLibApi extends BaseApi { + Future crateApiMinimalFuncForStructWithFieldRenameTwinNormal({required StructWithFieldRenameTwinNormal arg }); + +Future crateApiMinimalInitApp(); + +Future crateApiMinimalMinimalAdder({required int a , required int b }); + + + } + + + class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { + RustLibApiImpl({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + @override Future crateApiMinimalFuncForStructWithFieldRenameTwinNormal({required StructWithFieldRenameTwinNormal arg }) { return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_struct_with_field_rename_twin_normal(arg); + return wire.wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal(port_, arg0); + + }, + codec: + DcoCodec( + decodeSuccessData: dco_decode_struct_with_field_rename_twin_normal, + decodeErrorData: null, + ) + , + constMeta: kCrateApiMinimalFuncForStructWithFieldRenameTwinNormalConstMeta, + argValues: [arg], + apiImpl: this, + )); } + + + TaskConstMeta get kCrateApiMinimalFuncForStructWithFieldRenameTwinNormalConstMeta => const TaskConstMeta( + debugName: "func_for_struct_with_field_rename_twin_normal", + argNames: ["arg"], + ); + + +@override Future crateApiMinimalInitApp() { return handler.executeNormal(NormalTask( + callFfi: (port_) { + + return wire.wire__crate__api__minimal__init_app(port_); + + }, + codec: + DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ) + , + constMeta: kCrateApiMinimalInitAppConstMeta, + argValues: [], + apiImpl: this, + )); } + + + TaskConstMeta get kCrateApiMinimalInitAppConstMeta => const TaskConstMeta( + debugName: "init_app", + argNames: [], + ); + + +@override Future crateApiMinimalMinimalAdder({required int a , required int b }) { return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_i_32(a); +var arg1 = cst_encode_i_32(b); + return wire.wire__crate__api__minimal__minimal_adder(port_, arg0, arg1); + + }, + codec: + DcoCodec( + decodeSuccessData: dco_decode_i_32, + decodeErrorData: null, + ) + , + constMeta: kCrateApiMinimalMinimalAdderConstMeta, + argValues: [a, b], + apiImpl: this, + )); } + + + TaskConstMeta get kCrateApiMinimalMinimalAdderConstMeta => const TaskConstMeta( + debugName: "minimal_adder", + argNames: ["a", "b"], + ); + + + + + @protected StructWithFieldRenameTwinNormal dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw){ // Codec=Dco (DartCObject based), see doc to use other codecs +return dco_decode_struct_with_field_rename_twin_normal(raw); } + +@protected int dco_decode_i_32(dynamic raw){ // Codec=Dco (DartCObject based), see doc to use other codecs +return raw as int; } + +@protected StructWithFieldRenameTwinNormal dco_decode_struct_with_field_rename_twin_normal(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 StructWithFieldRenameTwinNormal(class: dco_decode_i_32(arr[0]),); } + +@protected void dco_decode_unit(dynamic raw){ // Codec=Dco (DartCObject based), see doc to use other codecs +return; } + +@protected StructWithFieldRenameTwinNormal sse_decode_box_autoadd_struct_with_field_rename_twin_normal(SseDeserializer deserializer){ // Codec=Sse (Serialization based), see doc to use other codecs +return (sse_decode_struct_with_field_rename_twin_normal(deserializer)); } + +@protected int sse_decode_i_32(SseDeserializer deserializer){ // Codec=Sse (Serialization based), see doc to use other codecs +return deserializer.buffer.getInt32(); } + +@protected StructWithFieldRenameTwinNormal sse_decode_struct_with_field_rename_twin_normal(SseDeserializer deserializer){ // Codec=Sse (Serialization based), see doc to use other codecs +var var_class = sse_decode_i_32(deserializer); +return StructWithFieldRenameTwinNormal(class: var_class); } + +@protected void sse_decode_unit(SseDeserializer deserializer){ // Codec=Sse (Serialization based), see doc to use other codecs + } + +@protected bool sse_decode_bool(SseDeserializer deserializer){ // Codec=Sse (Serialization based), see doc to use other codecs +return deserializer.buffer.getUint8() != 0; } + +@protected int cst_encode_i_32(int raw){ // Codec=Cst (C-struct based), see doc to use other codecs +return raw; } + +@protected void cst_encode_unit(void raw){ // Codec=Cst (C-struct based), see doc to use other codecs +return raw; } + +@protected void sse_encode_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer){ // Codec=Sse (Serialization based), see doc to use other codecs +sse_encode_struct_with_field_rename_twin_normal(self, serializer); } + +@protected void sse_encode_i_32(int self, SseSerializer serializer){ // Codec=Sse (Serialization based), see doc to use other codecs +serializer.buffer.putInt32(self); } + +@protected void sse_encode_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer){ // Codec=Sse (Serialization based), see doc to use other codecs +sse_encode_i_32(self.class, serializer); + } + +@protected void sse_encode_unit(void self, SseSerializer serializer){ // Codec=Sse (Serialization based), see doc to use other codecs + } + +@protected void sse_encode_bool(bool self, SseSerializer serializer){ // Codec=Sse (Serialization based), see doc to use other codecs +serializer.buffer.putUint8(self ? 1 : 0); } + } + diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart index 72e4d2de80..e007b8d392 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart @@ -10,45 +10,77 @@ import 'dart:ffi' as ffi; import 'frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; -abstract class RustLibApiImplPlatform extends BaseApiImpl { - RustLibApiImplPlatform({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, - }); - @protected - int dco_decode_i_32(dynamic raw); - @protected - void dco_decode_unit(dynamic raw); - @protected - int sse_decode_i_32(SseDeserializer deserializer); + abstract class RustLibApiImplPlatform extends BaseApiImpl { + RustLibApiImplPlatform({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); - @protected - void sse_decode_unit(SseDeserializer deserializer); + - @protected - bool sse_decode_bool(SseDeserializer deserializer); + @protected StructWithFieldRenameTwinNormal dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); - @protected - void sse_encode_i_32(int self, SseSerializer serializer); +@protected int dco_decode_i_32(dynamic raw); - @protected - void sse_encode_unit(void self, SseSerializer serializer); +@protected StructWithFieldRenameTwinNormal dco_decode_struct_with_field_rename_twin_normal(dynamic raw); + +@protected void dco_decode_unit(dynamic raw); + +@protected StructWithFieldRenameTwinNormal sse_decode_box_autoadd_struct_with_field_rename_twin_normal(SseDeserializer deserializer); + +@protected int sse_decode_i_32(SseDeserializer deserializer); + +@protected StructWithFieldRenameTwinNormal sse_decode_struct_with_field_rename_twin_normal(SseDeserializer deserializer); + +@protected void sse_decode_unit(SseDeserializer deserializer); + +@protected bool sse_decode_bool(SseDeserializer deserializer); + +@protected ffi.Pointer cst_encode_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal raw){ // Codec=Cst (C-struct based), see doc to use other codecs +final ptr = wire.cst_new_box_autoadd_struct_with_field_rename_twin_normal(); + cst_api_fill_to_wire_struct_with_field_rename_twin_normal(raw, ptr.ref); + return ptr; } + +@protected void cst_api_fill_to_wire_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal apiObj, ffi.Pointer wireObj){ cst_api_fill_to_wire_struct_with_field_rename_twin_normal(apiObj, wireObj.ref); } + +@protected void cst_api_fill_to_wire_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal apiObj, wire_cst_struct_with_field_rename_twin_normal wireObj){ wireObj.class_ = cst_encode_i_32(apiObj.class); } + +@protected int cst_encode_i_32(int raw); + +@protected void cst_encode_unit(void raw); + +@protected void sse_encode_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer); + +@protected void sse_encode_i_32(int self, SseSerializer serializer); + +@protected void sse_encode_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer); + +@protected void sse_encode_unit(void self, SseSerializer serializer); + +@protected void sse_encode_bool(bool self, SseSerializer serializer); + } + - @protected - void sse_encode_bool(bool self, SseSerializer serializer); -} // Section: wire_class +// ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint + +/// generated by flutter_rust_bridge class RustLibWire implements BaseWire { - factory RustLibWire.fromExternalLibrary(ExternalLibrary lib) => - RustLibWire(lib.ffiDynamicLibrary); + factory RustLibWire.fromExternalLibrary(ExternalLibrary lib) => + RustLibWire(lib.ffiDynamicLibrary); + /// Holds the symbol lookup function. final ffi.Pointer Function(String symbolName) _lookup; @@ -56,4 +88,129 @@ class RustLibWire implements BaseWire { /// The symbols are looked up in [dynamicLibrary]. RustLibWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; + + /// The symbols are looked up with [lookup]. + RustLibWire.fromLookup( + ffi.Pointer Function(String symbolName) + lookup) + : _lookup = lookup; + + void store_dart_post_cobject( + DartPostCObjectFnType ptr, + ) { + return _store_dart_post_cobject( + ptr, + ); + } + + late final _store_dart_post_cobjectPtr = + _lookup>( + 'store_dart_post_cobject'); + late final _store_dart_post_cobject = _store_dart_post_cobjectPtr + .asFunction(); + + void wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( + int port_, + ffi.Pointer arg, + ) { + return _wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( + port_, + arg, + ); + } + + late final _wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normalPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer< + wire_cst_struct_with_field_rename_twin_normal>)>>( + 'frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal'); + late final _wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal = + _wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normalPtr + .asFunction< + void Function( + int, + ffi.Pointer< + wire_cst_struct_with_field_rename_twin_normal>)>(); + + void wire__crate__api__minimal__init_app( + int port_, + ) { + return _wire__crate__api__minimal__init_app( + port_, + ); + } + + late final _wire__crate__api__minimal__init_appPtr = _lookup< + ffi.NativeFunction>( + 'frbgen_frb_example_dart_minimal_wire__crate__api__minimal__init_app'); + late final _wire__crate__api__minimal__init_app = + _wire__crate__api__minimal__init_appPtr.asFunction(); + + void wire__crate__api__minimal__minimal_adder( + int port_, + int a, + int b, + ) { + return _wire__crate__api__minimal__minimal_adder( + port_, + a, + b, + ); + } + + late final _wire__crate__api__minimal__minimal_adderPtr = _lookup< + ffi + .NativeFunction>( + 'frbgen_frb_example_dart_minimal_wire__crate__api__minimal__minimal_adder'); + late final _wire__crate__api__minimal__minimal_adder = + _wire__crate__api__minimal__minimal_adderPtr + .asFunction(); + + ffi.Pointer + cst_new_box_autoadd_struct_with_field_rename_twin_normal() { + return _cst_new_box_autoadd_struct_with_field_rename_twin_normal(); + } + + late final _cst_new_box_autoadd_struct_with_field_rename_twin_normalPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer + Function()>>( + 'frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_field_rename_twin_normal'); + late final _cst_new_box_autoadd_struct_with_field_rename_twin_normal = + _cst_new_box_autoadd_struct_with_field_rename_twin_normalPtr.asFunction< + ffi.Pointer + Function()>(); + + int dummy_method_to_enforce_bundling() { + return _dummy_method_to_enforce_bundling(); + } + + late final _dummy_method_to_enforce_bundlingPtr = + _lookup>( + 'dummy_method_to_enforce_bundling'); + late final _dummy_method_to_enforce_bundling = + _dummy_method_to_enforce_bundlingPtr.asFunction(); +} + + + + + +typedef DartPostCObjectFnType + = ffi.Pointer>; +typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( + DartPort port_id, ffi.Pointer message); +typedef DartDartPostCObjectFnTypeFunction = bool Function( + DartDartPort port_id, ffi.Pointer message); +typedef DartPort = ffi.Int64; +typedef DartDartPort = int; + + + +final class wire_cst_struct_with_field_rename_twin_normal extends ffi.Struct { + @ffi.Int32() + external int class_; } diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart index 69e39a7a08..1be71a2799 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart @@ -3,6 +3,7 @@ // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field + // Static analysis wrongly picks the IO variant, thus ignore this // ignore_for_file: argument_type_not_assignable @@ -12,48 +13,78 @@ import 'dart:convert'; import 'frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_web.dart'; -abstract class RustLibApiImplPlatform extends BaseApiImpl { - RustLibApiImplPlatform({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, - }); - @protected - int dco_decode_i_32(dynamic raw); - @protected - void dco_decode_unit(dynamic raw); - @protected - int sse_decode_i_32(SseDeserializer deserializer); + abstract class RustLibApiImplPlatform extends BaseApiImpl { + RustLibApiImplPlatform({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + + + @protected StructWithFieldRenameTwinNormal dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); + +@protected int dco_decode_i_32(dynamic raw); + +@protected StructWithFieldRenameTwinNormal dco_decode_struct_with_field_rename_twin_normal(dynamic raw); + +@protected void dco_decode_unit(dynamic raw); + +@protected StructWithFieldRenameTwinNormal sse_decode_box_autoadd_struct_with_field_rename_twin_normal(SseDeserializer deserializer); + +@protected int sse_decode_i_32(SseDeserializer deserializer); + +@protected StructWithFieldRenameTwinNormal sse_decode_struct_with_field_rename_twin_normal(SseDeserializer deserializer); + +@protected void sse_decode_unit(SseDeserializer deserializer); - @protected - void sse_decode_unit(SseDeserializer deserializer); +@protected bool sse_decode_bool(SseDeserializer deserializer); - @protected - bool sse_decode_bool(SseDeserializer deserializer); +@protected List cst_encode_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal raw){ // Codec=Cst (C-struct based), see doc to use other codecs +return cst_encode_struct_with_field_rename_twin_normal(raw); } - @protected - void sse_encode_i_32(int self, SseSerializer serializer); +@protected List cst_encode_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal raw){ // Codec=Cst (C-struct based), see doc to use other codecs +return [cst_encode_i_32(raw.class)]; } - @protected - void sse_encode_unit(void self, SseSerializer serializer); +@protected int cst_encode_i_32(int raw); + +@protected void cst_encode_unit(void raw); + +@protected void sse_encode_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer); + +@protected void sse_encode_i_32(int self, SseSerializer serializer); + +@protected void sse_encode_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer); + +@protected void sse_encode_unit(void self, SseSerializer serializer); + +@protected void sse_encode_bool(bool self, SseSerializer serializer); + } + - @protected - void sse_encode_bool(bool self, SseSerializer serializer); -} // Section: wire_class class RustLibWire implements BaseWire { - RustLibWire.fromExternalLibrary(ExternalLibrary lib); -} + RustLibWire.fromExternalLibrary(ExternalLibrary lib); + + void wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal(NativePortType port_,List arg) => wasmModule.wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal(port_,arg); + +void wire__crate__api__minimal__init_app(NativePortType port_) => wasmModule.wire__crate__api__minimal__init_app(port_); + +void wire__crate__api__minimal__minimal_adder(NativePortType port_,int a,int b) => wasmModule.wire__crate__api__minimal__minimal_adder(port_,a,b); + } + @JS('wasm_bindgen') external RustLibWasmModule get wasmModule; + + @JS() @anonymous class RustLibWasmModule { + external void wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal(NativePortType port_,List arg); -@JS('wasm_bindgen') -external RustLibWasmModule get wasmModule; +external void wire__crate__api__minimal__init_app(NativePortType port_); -@JS() -@anonymous -class RustLibWasmModule {} +external void wire__crate__api__minimal__minimal_adder(NativePortType port_,int a,int b); + } + \ No newline at end of file diff --git a/frb_example/dart_minimal/rust/src/frb_generated.io.rs b/frb_example/dart_minimal/rust/src/frb_generated.io.rs index 7c831957c4..a55e316093 100644 --- a/frb_example/dart_minimal/rust/src/frb_generated.io.rs +++ b/frb_example/dart_minimal/rust/src/frb_generated.io.rs @@ -11,3 +11,73 @@ use flutter_rust_bridge::{Handler, IntoIntoDart}; // Section: boilerplate flutter_rust_bridge::frb_generated_boilerplate_io!(); + +// Section: dart2rust + +impl CstDecode + for *mut wire_cst_struct_with_field_rename_twin_normal +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::minimal::StructWithFieldRenameTwinNormal { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for wire_cst_struct_with_field_rename_twin_normal +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::minimal::StructWithFieldRenameTwinNormal { + crate::api::minimal::StructWithFieldRenameTwinNormal { + class: self.class.cst_decode(), + } + } +} +impl NewWithNullPtr for wire_cst_struct_with_field_rename_twin_normal { + fn new_with_null_ptr() -> Self { + Self { + class: Default::default(), + } + } +} +impl Default for wire_cst_struct_with_field_rename_twin_normal { + fn default() -> Self { + Self::new_with_null_ptr() + } +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( + port_: i64, + arg: *mut wire_cst_struct_with_field_rename_twin_normal, +) { + wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal_impl(port_, arg) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_dart_minimal_wire__crate__api__minimal__init_app(port_: i64) { + wire__crate__api__minimal__init_app_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_dart_minimal_wire__crate__api__minimal__minimal_adder( + port_: i64, + a: i32, + b: i32, +) { + wire__crate__api__minimal__minimal_adder_impl(port_, a, b) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_field_rename_twin_normal( +) -> *mut wire_cst_struct_with_field_rename_twin_normal { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_struct_with_field_rename_twin_normal::new_with_null_ptr(), + ) +} + +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_struct_with_field_rename_twin_normal { + class: i32, +} diff --git a/frb_example/dart_minimal/rust/src/frb_generated.rs b/frb_example/dart_minimal/rust/src/frb_generated.rs index 361f76bac8..53053a4d9f 100644 --- a/frb_example/dart_minimal/rust/src/frb_generated.rs +++ b/frb_example/dart_minimal/rust/src/frb_generated.rs @@ -28,12 +28,12 @@ use flutter_rust_bridge::{Handler, IntoIntoDart}; // Section: boilerplate flutter_rust_bridge::frb_generated_boilerplate!( - default_stream_sink_codec = SseCodec, - default_rust_opaque = RustOpaqueMoi, - default_rust_auto_opaque = RustAutoOpaqueMoi, + default_stream_sink_codec = DcoCodec, + default_rust_opaque = RustOpaqueNom, + default_rust_auto_opaque = RustAutoOpaqueNom, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.38"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -2119384465; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 309815666; // Section: executor @@ -41,31 +41,40 @@ flutter_rust_bridge::frb_generated_default_handler!(); // Section: wire_funcs +fn wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "func_for_struct_with_field_rename_twin_normal", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_arg = arg.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok( + crate::api::minimal::func_for_struct_with_field_rename_twin_normal(api_arg), + ) + })()) + } + }, + ) +} fn wire__crate__api__minimal__init_app_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "init_app", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let message = unsafe { - flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( - ptr_, - rust_vec_len_, - data_len_, - ) - }; - let mut deserializer = - flutter_rust_bridge::for_generated::SseDeserializer::new(message); - deserializer.end(); move |context| { - transform_result_sse((move || { + transform_result_dco((move || { Result::<_, ()>::Ok({ crate::api::minimal::init_app(); }) @@ -76,31 +85,20 @@ fn wire__crate__api__minimal__init_app_impl( } fn wire__crate__api__minimal__minimal_adder_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, + a: impl CstDecode, + b: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "minimal_adder", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let message = unsafe { - flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( - ptr_, - rust_vec_len_, - data_len_, - ) - }; - let mut deserializer = - flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_a = ::sse_decode(&mut deserializer); - let api_b = ::sse_decode(&mut deserializer); - deserializer.end(); + let api_a = a.cst_decode(); + let api_b = b.cst_decode(); move |context| { - transform_result_sse((move || { + transform_result_dco((move || { Result::<_, ()>::Ok(crate::api::minimal::minimal_adder(api_a, api_b)) })()) } @@ -110,6 +108,12 @@ fn wire__crate__api__minimal__minimal_adder_impl( // Section: dart2rust +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> i32 { + self + } +} impl SseDecode for i32 { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -117,6 +121,14 @@ impl SseDecode for i32 { } } +impl SseDecode for crate::api::minimal::StructWithFieldRenameTwinNormal { + // 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_class = ::sse_decode(deserializer); + return crate::api::minimal::StructWithFieldRenameTwinNormal { class: var_class }; + } +} + impl SseDecode for () { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {} @@ -138,8 +150,6 @@ fn pde_ffi_dispatcher_primary_impl( ) { // Codec=Pde (Serialization + dispatch), see doc to use other codecs match func_id { - 1 => wire__crate__api__minimal__init_app_impl(port, ptr, rust_vec_len, data_len), - 2 => wire__crate__api__minimal__minimal_adder_impl(port, ptr, rust_vec_len, data_len), _ => unreachable!(), } } @@ -158,6 +168,24 @@ fn pde_ffi_dispatcher_sync_impl( // Section: rust2dart +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::minimal::StructWithFieldRenameTwinNormal { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.class.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::minimal::StructWithFieldRenameTwinNormal +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::minimal::StructWithFieldRenameTwinNormal +{ + fn into_into_dart(self) -> crate::api::minimal::StructWithFieldRenameTwinNormal { + self + } +} + impl SseEncode for i32 { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -165,6 +193,13 @@ impl SseEncode for i32 { } } +impl SseEncode for crate::api::minimal::StructWithFieldRenameTwinNormal { + // 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.class, serializer); + } +} + impl SseEncode for () { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {} diff --git a/frb_example/dart_minimal/rust/src/frb_generated.web.rs b/frb_example/dart_minimal/rust/src/frb_generated.web.rs index 0a83f28fdd..65739c578c 100644 --- a/frb_example/dart_minimal/rust/src/frb_generated.web.rs +++ b/frb_example/dart_minimal/rust/src/frb_generated.web.rs @@ -13,3 +13,53 @@ use flutter_rust_bridge::{Handler, IntoIntoDart}; // Section: boilerplate flutter_rust_bridge::frb_generated_boilerplate_web!(); + +// Section: dart2rust + +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::minimal::StructWithFieldRenameTwinNormal { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::minimal::StructWithFieldRenameTwinNormal { + class: 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) -> i32 { + self.unchecked_into_f64() as _ + } +} + +#[wasm_bindgen] +pub fn wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal_impl(port_, arg) +} + +#[wasm_bindgen] +pub fn wire__crate__api__minimal__init_app(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire__crate__api__minimal__init_app_impl(port_) +} + +#[wasm_bindgen] +pub fn wire__crate__api__minimal__minimal_adder( + port_: flutter_rust_bridge::for_generated::MessagePort, + a: i32, + b: i32, +) { + wire__crate__api__minimal__minimal_adder_impl(port_, a, b) +} From abc776519009f8fc57d28e342d3e04377062e55c Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:14:53 +0800 Subject: [PATCH 17/36] refactor: extract --- frb_codegen/src/library/codegen/ir/mir/ident.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index 9880e42750..4063f3de22 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -50,9 +50,7 @@ impl std::fmt::Display for MirIdent { fn convert_rust_to_c_style(raw: &str) -> String { let mut ans = raw.to_owned(); - if let Some(stripped) = ans.strip_prefix("r#") { - ans = stripped.to_owned(); - } + ans = strip_prefix_rhash(raw).to_owned(); // match behavior of ffigen if &ans == "async" { @@ -66,5 +64,9 @@ fn convert_rust_to_c_style(raw: &str) -> String { } fn convert_rust_to_dart_style(raw: &str) -> String { - (raw.strip_prefix("r#").unwrap_or(raw)).to_case(Case::Camel) + strip_prefix_rhash(raw).to_case(Case::Camel) } + +fn strip_prefix_rhash(raw: &str) -> &str { + raw.strip_prefix("r#").unwrap_or(raw) +} \ No newline at end of file From e015130fc9371a845e5a6018f1e0854e81802e05 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:15:25 +0800 Subject: [PATCH 18/36] feat: use --- frb_codegen/src/library/codegen/ir/mir/ident.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index 4063f3de22..b7262c6227 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -26,7 +26,7 @@ impl MirIdent { } pub fn dart_style(&self) -> String { - convert_rust_to_dart_style(&self.rust_style) + (self.dart_style.clone()).unwrap_or_else(|| convert_rust_to_dart_style(&self.rust_style)) } pub fn style(&self, lang: &Lang) -> String { @@ -69,4 +69,4 @@ fn convert_rust_to_dart_style(raw: &str) -> String { fn strip_prefix_rhash(raw: &str) -> &str { raw.strip_prefix("r#").unwrap_or(raw) -} \ No newline at end of file +} From ccbc8a2a7c7ea248d7023ce2f978af9cfc51a67c Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:15:58 +0800 Subject: [PATCH 19/36] chore: lint --- frb_codegen/src/library/codegen/ir/mir/ident.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index b7262c6227..d0f76a1f88 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -48,9 +48,7 @@ impl std::fmt::Display for MirIdent { } fn convert_rust_to_c_style(raw: &str) -> String { - let mut ans = raw.to_owned(); - - ans = strip_prefix_rhash(raw).to_owned(); + let mut ans = strip_prefix_rhash(raw).to_owned(); // match behavior of ffigen if &ans == "async" { From adf9c5afb5d40a0e9775644b500eaee743f3483a Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:16:04 +0800 Subject: [PATCH 20/36] chore: codegen --- .../lib/src/rust/api/minimal.dart | 55 +-- .../lib/src/rust/frb_generated.dart | 457 ++++++++++-------- .../lib/src/rust/frb_generated.io.dart | 118 +++-- .../lib/src/rust/frb_generated.web.dart | 133 +++-- .../dart_minimal/rust/src/frb_generated.rs | 6 +- 5 files changed, 442 insertions(+), 327 deletions(-) diff --git a/frb_example/dart_minimal/lib/src/rust/api/minimal.dart b/frb_example/dart_minimal/lib/src/rust/api/minimal.dart index c1fade1d2c..37a0136820 100644 --- a/frb_example/dart_minimal/lib/src/rust/api/minimal.dart +++ b/frb_example/dart_minimal/lib/src/rust/api/minimal.dart @@ -6,33 +6,28 @@ import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; - - - - Future minimalAdder({required int a , required int b }) => RustLib.instance.api.crateApiMinimalMinimalAdder(a: a, b: b); - -Future funcForStructWithFieldRenameTwinNormal({required StructWithFieldRenameTwinNormal arg }) => RustLib.instance.api.crateApiMinimalFuncForStructWithFieldRenameTwinNormal(arg: arg); - - class StructWithFieldRenameTwinNormal { - final int class; - - const StructWithFieldRenameTwinNormal({required this.class ,}); - - - - - - @override - int get hashCode => class.hashCode; - - - - @override - bool operator ==(Object other) => - identical(this, other) || - other is StructWithFieldRenameTwinNormal && - runtimeType == other.runtimeType - && class == other.class; - - } - \ No newline at end of file +Future minimalAdder({required int a, required int b}) => + RustLib.instance.api.crateApiMinimalMinimalAdder(a: a, b: b); + +Future funcForStructWithFieldRenameTwinNormal( + {required StructWithFieldRenameTwinNormal arg}) => + RustLib.instance.api + .crateApiMinimalFuncForStructWithFieldRenameTwinNormal(arg: arg); + +class StructWithFieldRenameTwinNormal { + final int renamed_field; + + const StructWithFieldRenameTwinNormal({ + required this.renamed_field, + }); + + @override + int get hashCode => renamed_field.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithFieldRenameTwinNormal && + runtimeType == other.runtimeType && + renamed_field == other.renamed_field; +} diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.dart index ce2184d6ba..62e15cf0d4 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.dart @@ -10,206 +10,261 @@ import 'frb_generated.dart'; import 'frb_generated.io.dart' if (dart.library.html) 'frb_generated.web.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; - - /// Main entrypoint of the Rust API - class RustLib extends BaseEntrypoint { - @internal - static final instance = RustLib._(); - - RustLib._(); - - /// Initialize flutter_rust_bridge - static Future init({ - RustLibApi? api, - BaseHandler? handler, - ExternalLibrary? externalLibrary, - }) async { - await instance.initImpl( - api: api, - handler: handler, - externalLibrary: externalLibrary, - ); - } - - /// Dispose flutter_rust_bridge - /// - /// The call to this function is optional, since flutter_rust_bridge (and everything else) - /// is automatically disposed when the app stops. - static void dispose() => instance.disposeImpl(); - - @override - ApiImplConstructor get apiImplConstructor => RustLibApiImpl.new; - - @override - WireConstructor get wireConstructor => RustLibWire.fromExternalLibrary; - - @override - Future executeRustInitializers() async { - await api.crateApiMinimalInitApp(); - - } - - @override - ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; - - @override - String get codegenVersion => '2.0.0-dev.38'; - - @override - int get rustContentHash => 309815666; - - static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( - stem: 'frb_example_dart_minimal', - ioDirectory: 'rust/target/release/', - webPrefix: 'pkg/', - ); - } - - - abstract class RustLibApi extends BaseApi { - Future crateApiMinimalFuncForStructWithFieldRenameTwinNormal({required StructWithFieldRenameTwinNormal arg }); - -Future crateApiMinimalInitApp(); - -Future crateApiMinimalMinimalAdder({required int a , required int b }); - - - } - - - class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { - RustLibApiImpl({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, - }); - - @override Future crateApiMinimalFuncForStructWithFieldRenameTwinNormal({required StructWithFieldRenameTwinNormal arg }) { return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_struct_with_field_rename_twin_normal(arg); - return wire.wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal(port_, arg0); - - }, - codec: - DcoCodec( - decodeSuccessData: dco_decode_struct_with_field_rename_twin_normal, - decodeErrorData: null, - ) - , - constMeta: kCrateApiMinimalFuncForStructWithFieldRenameTwinNormalConstMeta, - argValues: [arg], - apiImpl: this, - )); } - - - TaskConstMeta get kCrateApiMinimalFuncForStructWithFieldRenameTwinNormalConstMeta => const TaskConstMeta( +/// Main entrypoint of the Rust API +class RustLib extends BaseEntrypoint { + @internal + static final instance = RustLib._(); + + RustLib._(); + + /// Initialize flutter_rust_bridge + static Future init({ + RustLibApi? api, + BaseHandler? handler, + ExternalLibrary? externalLibrary, + }) async { + await instance.initImpl( + api: api, + handler: handler, + externalLibrary: externalLibrary, + ); + } + + /// Dispose flutter_rust_bridge + /// + /// The call to this function is optional, since flutter_rust_bridge (and everything else) + /// is automatically disposed when the app stops. + static void dispose() => instance.disposeImpl(); + + @override + ApiImplConstructor get apiImplConstructor => + RustLibApiImpl.new; + + @override + WireConstructor get wireConstructor => + RustLibWire.fromExternalLibrary; + + @override + Future executeRustInitializers() async { + await api.crateApiMinimalInitApp(); + } + + @override + ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => + kDefaultExternalLibraryLoaderConfig; + + @override + String get codegenVersion => '2.0.0-dev.38'; + + @override + int get rustContentHash => 309815666; + + static const kDefaultExternalLibraryLoaderConfig = + ExternalLibraryLoaderConfig( + stem: 'frb_example_dart_minimal', + ioDirectory: 'rust/target/release/', + webPrefix: 'pkg/', + ); +} + +abstract class RustLibApi extends BaseApi { + Future + crateApiMinimalFuncForStructWithFieldRenameTwinNormal( + {required StructWithFieldRenameTwinNormal arg}); + + Future crateApiMinimalInitApp(); + + Future crateApiMinimalMinimalAdder({required int a, required int b}); +} + +class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { + RustLibApiImpl({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + @override + Future + crateApiMinimalFuncForStructWithFieldRenameTwinNormal( + {required StructWithFieldRenameTwinNormal arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_box_autoadd_struct_with_field_rename_twin_normal(arg); + return wire + .wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_struct_with_field_rename_twin_normal, + decodeErrorData: null, + ), + constMeta: + kCrateApiMinimalFuncForStructWithFieldRenameTwinNormalConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiMinimalFuncForStructWithFieldRenameTwinNormalConstMeta => + const TaskConstMeta( debugName: "func_for_struct_with_field_rename_twin_normal", argNames: ["arg"], - ); - - -@override Future crateApiMinimalInitApp() { return handler.executeNormal(NormalTask( - callFfi: (port_) { - - return wire.wire__crate__api__minimal__init_app(port_); - - }, - codec: - DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, - ) - , - constMeta: kCrateApiMinimalInitAppConstMeta, - argValues: [], - apiImpl: this, - )); } - - - TaskConstMeta get kCrateApiMinimalInitAppConstMeta => const TaskConstMeta( - debugName: "init_app", - argNames: [], - ); - - -@override Future crateApiMinimalMinimalAdder({required int a , required int b }) { return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_i_32(a); -var arg1 = cst_encode_i_32(b); - return wire.wire__crate__api__minimal__minimal_adder(port_, arg0, arg1); - - }, - codec: - DcoCodec( - decodeSuccessData: dco_decode_i_32, - decodeErrorData: null, - ) - , - constMeta: kCrateApiMinimalMinimalAdderConstMeta, - argValues: [a, b], - apiImpl: this, - )); } - - - TaskConstMeta get kCrateApiMinimalMinimalAdderConstMeta => const TaskConstMeta( - debugName: "minimal_adder", - argNames: ["a", "b"], - ); - - - - - @protected StructWithFieldRenameTwinNormal dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw){ // Codec=Dco (DartCObject based), see doc to use other codecs -return dco_decode_struct_with_field_rename_twin_normal(raw); } - -@protected int dco_decode_i_32(dynamic raw){ // Codec=Dco (DartCObject based), see doc to use other codecs -return raw as int; } - -@protected StructWithFieldRenameTwinNormal dco_decode_struct_with_field_rename_twin_normal(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 StructWithFieldRenameTwinNormal(class: dco_decode_i_32(arr[0]),); } - -@protected void dco_decode_unit(dynamic raw){ // Codec=Dco (DartCObject based), see doc to use other codecs -return; } - -@protected StructWithFieldRenameTwinNormal sse_decode_box_autoadd_struct_with_field_rename_twin_normal(SseDeserializer deserializer){ // Codec=Sse (Serialization based), see doc to use other codecs -return (sse_decode_struct_with_field_rename_twin_normal(deserializer)); } - -@protected int sse_decode_i_32(SseDeserializer deserializer){ // Codec=Sse (Serialization based), see doc to use other codecs -return deserializer.buffer.getInt32(); } - -@protected StructWithFieldRenameTwinNormal sse_decode_struct_with_field_rename_twin_normal(SseDeserializer deserializer){ // Codec=Sse (Serialization based), see doc to use other codecs -var var_class = sse_decode_i_32(deserializer); -return StructWithFieldRenameTwinNormal(class: var_class); } - -@protected void sse_decode_unit(SseDeserializer deserializer){ // Codec=Sse (Serialization based), see doc to use other codecs - } - -@protected bool sse_decode_bool(SseDeserializer deserializer){ // Codec=Sse (Serialization based), see doc to use other codecs -return deserializer.buffer.getUint8() != 0; } - -@protected int cst_encode_i_32(int raw){ // Codec=Cst (C-struct based), see doc to use other codecs -return raw; } - -@protected void cst_encode_unit(void raw){ // Codec=Cst (C-struct based), see doc to use other codecs -return raw; } - -@protected void sse_encode_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer){ // Codec=Sse (Serialization based), see doc to use other codecs -sse_encode_struct_with_field_rename_twin_normal(self, serializer); } - -@protected void sse_encode_i_32(int self, SseSerializer serializer){ // Codec=Sse (Serialization based), see doc to use other codecs -serializer.buffer.putInt32(self); } - -@protected void sse_encode_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer){ // Codec=Sse (Serialization based), see doc to use other codecs -sse_encode_i_32(self.class, serializer); - } - -@protected void sse_encode_unit(void self, SseSerializer serializer){ // Codec=Sse (Serialization based), see doc to use other codecs - } - -@protected void sse_encode_bool(bool self, SseSerializer serializer){ // Codec=Sse (Serialization based), see doc to use other codecs -serializer.buffer.putUint8(self ? 1 : 0); } - } - + ); + + @override + Future crateApiMinimalInitApp() { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire__crate__api__minimal__init_app(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateApiMinimalInitAppConstMeta, + argValues: [], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiMinimalInitAppConstMeta => const TaskConstMeta( + debugName: "init_app", + argNames: [], + ); + + @override + Future crateApiMinimalMinimalAdder({required int a, required int b}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_i_32(a); + var arg1 = cst_encode_i_32(b); + return wire.wire__crate__api__minimal__minimal_adder(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_i_32, + decodeErrorData: null, + ), + constMeta: kCrateApiMinimalMinimalAdderConstMeta, + argValues: [a, b], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiMinimalMinimalAdderConstMeta => + const TaskConstMeta( + debugName: "minimal_adder", + argNames: ["a", "b"], + ); + + @protected + StructWithFieldRenameTwinNormal + dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_field_rename_twin_normal(raw); + } + + @protected + int dco_decode_i_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + StructWithFieldRenameTwinNormal + dco_decode_struct_with_field_rename_twin_normal(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 StructWithFieldRenameTwinNormal( + renamed_field: dco_decode_i_32(arr[0]), + ); + } + + @protected + void dco_decode_unit(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return; + } + + @protected + StructWithFieldRenameTwinNormal + sse_decode_box_autoadd_struct_with_field_rename_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_field_rename_twin_normal(deserializer)); + } + + @protected + int sse_decode_i_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getInt32(); + } + + @protected + StructWithFieldRenameTwinNormal + sse_decode_struct_with_field_rename_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_renamed_field = sse_decode_i_32(deserializer); + return StructWithFieldRenameTwinNormal(renamed_field: var_renamed_field); + } + + @protected + void sse_decode_unit(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + } + + @protected + bool sse_decode_bool(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint8() != 0; + } + + @protected + int cst_encode_i_32(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + void cst_encode_unit(void raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_field_rename_twin_normal(self, serializer); + } + + @protected + void sse_encode_i_32(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putInt32(self); + } + + @protected + void sse_encode_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.renamed_field, serializer); + } + + @protected + void sse_encode_unit(void self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + } + + @protected + void sse_encode_bool(bool self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint8(self ? 1 : 0); + } +} diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart index e007b8d392..683d369607 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart @@ -10,62 +10,95 @@ import 'dart:ffi' as ffi; import 'frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; +abstract class RustLibApiImplPlatform extends BaseApiImpl { + RustLibApiImplPlatform({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + @protected + StructWithFieldRenameTwinNormal + dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); + @protected + int dco_decode_i_32(dynamic raw); - abstract class RustLibApiImplPlatform extends BaseApiImpl { - RustLibApiImplPlatform({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, - }); + @protected + StructWithFieldRenameTwinNormal + dco_decode_struct_with_field_rename_twin_normal(dynamic raw); - + @protected + void dco_decode_unit(dynamic raw); - @protected StructWithFieldRenameTwinNormal dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); + @protected + StructWithFieldRenameTwinNormal + sse_decode_box_autoadd_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); -@protected int dco_decode_i_32(dynamic raw); + @protected + int sse_decode_i_32(SseDeserializer deserializer); -@protected StructWithFieldRenameTwinNormal dco_decode_struct_with_field_rename_twin_normal(dynamic raw); + @protected + StructWithFieldRenameTwinNormal + sse_decode_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); -@protected void dco_decode_unit(dynamic raw); + @protected + void sse_decode_unit(SseDeserializer deserializer); -@protected StructWithFieldRenameTwinNormal sse_decode_box_autoadd_struct_with_field_rename_twin_normal(SseDeserializer deserializer); + @protected + bool sse_decode_bool(SseDeserializer deserializer); -@protected int sse_decode_i_32(SseDeserializer deserializer); - -@protected StructWithFieldRenameTwinNormal sse_decode_struct_with_field_rename_twin_normal(SseDeserializer deserializer); - -@protected void sse_decode_unit(SseDeserializer deserializer); - -@protected bool sse_decode_bool(SseDeserializer deserializer); - -@protected ffi.Pointer cst_encode_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal raw){ // Codec=Cst (C-struct based), see doc to use other codecs -final ptr = wire.cst_new_box_autoadd_struct_with_field_rename_twin_normal(); - cst_api_fill_to_wire_struct_with_field_rename_twin_normal(raw, ptr.ref); - return ptr; } - -@protected void cst_api_fill_to_wire_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal apiObj, ffi.Pointer wireObj){ cst_api_fill_to_wire_struct_with_field_rename_twin_normal(apiObj, wireObj.ref); } + @protected + ffi.Pointer + cst_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_struct_with_field_rename_twin_normal(); + cst_api_fill_to_wire_struct_with_field_rename_twin_normal(raw, ptr.ref); + return ptr; + } -@protected void cst_api_fill_to_wire_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal apiObj, wire_cst_struct_with_field_rename_twin_normal wireObj){ wireObj.class_ = cst_encode_i_32(apiObj.class); } + @protected + void cst_api_fill_to_wire_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_struct_with_field_rename_twin_normal( + apiObj, wireObj.ref); + } -@protected int cst_encode_i_32(int raw); + @protected + void cst_api_fill_to_wire_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal apiObj, + wire_cst_struct_with_field_rename_twin_normal wireObj) { + wireObj.class_ = cst_encode_i_32(apiObj.renamed_field); + } -@protected void cst_encode_unit(void raw); + @protected + int cst_encode_i_32(int raw); -@protected void sse_encode_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer); + @protected + void cst_encode_unit(void raw); -@protected void sse_encode_i_32(int self, SseSerializer serializer); + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); -@protected void sse_encode_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer); + @protected + void sse_encode_i_32(int self, SseSerializer serializer); -@protected void sse_encode_unit(void self, SseSerializer serializer); + @protected + void sse_encode_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); -@protected void sse_encode_bool(bool self, SseSerializer serializer); - } - + @protected + void sse_encode_unit(void self, SseSerializer serializer); + @protected + void sse_encode_bool(bool self, SseSerializer serializer); +} // Section: wire_class @@ -77,10 +110,9 @@ final ptr = wire.cst_new_box_autoadd_struct_with_field_rename_twin_normal(); /// generated by flutter_rust_bridge class RustLibWire implements BaseWire { + factory RustLibWire.fromExternalLibrary(ExternalLibrary lib) => + RustLibWire(lib.ffiDynamicLibrary); - factory RustLibWire.fromExternalLibrary(ExternalLibrary lib) => - RustLibWire(lib.ffiDynamicLibrary); - /// Holds the symbol lookup function. final ffi.Pointer Function(String symbolName) _lookup; @@ -195,10 +227,6 @@ class RustLibWire implements BaseWire { _dummy_method_to_enforce_bundlingPtr.asFunction(); } - - - - typedef DartPostCObjectFnType = ffi.Pointer>; typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( @@ -208,8 +236,6 @@ typedef DartDartPostCObjectFnTypeFunction = bool Function( typedef DartPort = ffi.Int64; typedef DartDartPort = int; - - final class wire_cst_struct_with_field_rename_twin_normal extends ffi.Struct { @ffi.Int32() external int class_; diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart index 1be71a2799..d5be5b059f 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart @@ -3,7 +3,6 @@ // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field - // Static analysis wrongly picks the IO variant, thus ignore this // ignore_for_file: argument_type_not_assignable @@ -13,78 +12,116 @@ import 'dart:convert'; import 'frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_web.dart'; +abstract class RustLibApiImplPlatform extends BaseApiImpl { + RustLibApiImplPlatform({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + @protected + StructWithFieldRenameTwinNormal + dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); + @protected + int dco_decode_i_32(dynamic raw); - abstract class RustLibApiImplPlatform extends BaseApiImpl { - RustLibApiImplPlatform({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, - }); - - - - @protected StructWithFieldRenameTwinNormal dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); - -@protected int dco_decode_i_32(dynamic raw); + @protected + StructWithFieldRenameTwinNormal + dco_decode_struct_with_field_rename_twin_normal(dynamic raw); -@protected StructWithFieldRenameTwinNormal dco_decode_struct_with_field_rename_twin_normal(dynamic raw); + @protected + void dco_decode_unit(dynamic raw); -@protected void dco_decode_unit(dynamic raw); + @protected + StructWithFieldRenameTwinNormal + sse_decode_box_autoadd_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); -@protected StructWithFieldRenameTwinNormal sse_decode_box_autoadd_struct_with_field_rename_twin_normal(SseDeserializer deserializer); + @protected + int sse_decode_i_32(SseDeserializer deserializer); -@protected int sse_decode_i_32(SseDeserializer deserializer); + @protected + StructWithFieldRenameTwinNormal + sse_decode_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); -@protected StructWithFieldRenameTwinNormal sse_decode_struct_with_field_rename_twin_normal(SseDeserializer deserializer); + @protected + void sse_decode_unit(SseDeserializer deserializer); -@protected void sse_decode_unit(SseDeserializer deserializer); + @protected + bool sse_decode_bool(SseDeserializer deserializer); -@protected bool sse_decode_bool(SseDeserializer deserializer); + @protected + List cst_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_struct_with_field_rename_twin_normal(raw); + } -@protected List cst_encode_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal raw){ // Codec=Cst (C-struct based), see doc to use other codecs -return cst_encode_struct_with_field_rename_twin_normal(raw); } + @protected + List cst_encode_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_i_32(raw.renamed_field)]; + } -@protected List cst_encode_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal raw){ // Codec=Cst (C-struct based), see doc to use other codecs -return [cst_encode_i_32(raw.class)]; } + @protected + int cst_encode_i_32(int raw); -@protected int cst_encode_i_32(int raw); + @protected + void cst_encode_unit(void raw); -@protected void cst_encode_unit(void raw); + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); -@protected void sse_encode_box_autoadd_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer); + @protected + void sse_encode_i_32(int self, SseSerializer serializer); -@protected void sse_encode_i_32(int self, SseSerializer serializer); + @protected + void sse_encode_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); -@protected void sse_encode_struct_with_field_rename_twin_normal(StructWithFieldRenameTwinNormal self, SseSerializer serializer); - -@protected void sse_encode_unit(void self, SseSerializer serializer); - -@protected void sse_encode_bool(bool self, SseSerializer serializer); - } - + @protected + void sse_encode_unit(void self, SseSerializer serializer); + @protected + void sse_encode_bool(bool self, SseSerializer serializer); +} // Section: wire_class class RustLibWire implements BaseWire { - RustLibWire.fromExternalLibrary(ExternalLibrary lib); + RustLibWire.fromExternalLibrary(ExternalLibrary lib); + + void wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( + NativePortType port_, List arg) => + wasmModule + .wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( + port_, arg); - void wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal(NativePortType port_,List arg) => wasmModule.wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal(port_,arg); + void wire__crate__api__minimal__init_app(NativePortType port_) => + wasmModule.wire__crate__api__minimal__init_app(port_); -void wire__crate__api__minimal__init_app(NativePortType port_) => wasmModule.wire__crate__api__minimal__init_app(port_); + void wire__crate__api__minimal__minimal_adder( + NativePortType port_, int a, int b) => + wasmModule.wire__crate__api__minimal__minimal_adder(port_, a, b); +} -void wire__crate__api__minimal__minimal_adder(NativePortType port_,int a,int b) => wasmModule.wire__crate__api__minimal__minimal_adder(port_,a,b); - } - @JS('wasm_bindgen') external RustLibWasmModule get wasmModule; +@JS('wasm_bindgen') +external RustLibWasmModule get wasmModule; - @JS() @anonymous class RustLibWasmModule { - external void wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal(NativePortType port_,List arg); +@JS() +@anonymous +class RustLibWasmModule { + external void + wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( + NativePortType port_, List arg); -external void wire__crate__api__minimal__init_app(NativePortType port_); + external void wire__crate__api__minimal__init_app(NativePortType port_); -external void wire__crate__api__minimal__minimal_adder(NativePortType port_,int a,int b); - } - \ No newline at end of file + external void wire__crate__api__minimal__minimal_adder( + NativePortType port_, int a, int b); +} diff --git a/frb_example/dart_minimal/rust/src/frb_generated.rs b/frb_example/dart_minimal/rust/src/frb_generated.rs index 53053a4d9f..6f4092b1d3 100644 --- a/frb_example/dart_minimal/rust/src/frb_generated.rs +++ b/frb_example/dart_minimal/rust/src/frb_generated.rs @@ -124,8 +124,10 @@ impl SseDecode for i32 { impl SseDecode for crate::api::minimal::StructWithFieldRenameTwinNormal { // 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_class = ::sse_decode(deserializer); - return crate::api::minimal::StructWithFieldRenameTwinNormal { class: var_class }; + let mut var_renamed_field = ::sse_decode(deserializer); + return crate::api::minimal::StructWithFieldRenameTwinNormal { + class: var_renamed_field, + }; } } From 0e05bb15f9ab41b912b5709bdb4f6d9d5e83854a Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:20:02 +0800 Subject: [PATCH 21/36] chore: doc --- .../guides/types/translatable/detailed/struct.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/website/docs/guides/types/translatable/detailed/struct.md b/website/docs/guides/types/translatable/detailed/struct.md index 42b3aeb247..79a4c48cd6 100644 --- a/website/docs/guides/types/translatable/detailed/struct.md +++ b/website/docs/guides/types/translatable/detailed/struct.md @@ -30,6 +30,21 @@ See below for an example. If you want the generated Dart class to be [`freezed`](https://pub.dev/packages/freezed) (which is like data-classes in other languages like Kotlin), simply put `#[frb(dart_metadata=("freezed"))]` and it will generate everything needed for you. +## Rename fields + +The `#[frb(name = "...")]` can be utilized to change the Dart name of a struct field. +For example: + +```rust +#[frb] +pub struct MyStruct { + #[frb(name = "dartFieldName")] + pub rust_field_name: Vec, +} +``` + +It will give a Dart class with field `dartFieldName`. + ## Example ### Example 1: Recursive fields From 3209195ab70a338a05706eee3b044dc82c4c04c8 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:21:38 +0800 Subject: [PATCH 22/36] chore: change --- frb_codegen/src/library/utils/dart_keywords.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/frb_codegen/src/library/utils/dart_keywords.rs b/frb_codegen/src/library/utils/dart_keywords.rs index 0c0fdde318..027a0ce808 100644 --- a/frb_codegen/src/library/utils/dart_keywords.rs +++ b/frb_codegen/src/library/utils/dart_keywords.rs @@ -1,10 +1,6 @@ use anyhow::bail; use convert_case::{Case, Casing}; -/// If the given string is a Dart keyword, then -/// convert it to PascalCase to avoid issues. -/// If the string is not a keyword, then the original -/// is returned. pub(crate) fn make_string_keyword_safe(input: String) -> String { if check_for_keywords(&[input.clone()]).is_err() { input.to_case(Case::Pascal) From 0b4db06d3691c4530d27425a2c2b2787cfa3a6ad Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:22:45 +0800 Subject: [PATCH 23/36] feat: change --- frb_codegen/src/library/utils/dart_keywords.rs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/frb_codegen/src/library/utils/dart_keywords.rs b/frb_codegen/src/library/utils/dart_keywords.rs index 027a0ce808..c07e1f62f2 100644 --- a/frb_codegen/src/library/utils/dart_keywords.rs +++ b/frb_codegen/src/library/utils/dart_keywords.rs @@ -1,24 +1,11 @@ -use anyhow::bail; -use convert_case::{Case, Casing}; - pub(crate) fn make_string_keyword_safe(input: String) -> String { - if check_for_keywords(&[input.clone()]).is_err() { - input.to_case(Case::Pascal) + if DART_KEYWORDS.contains(&input.as_str()) { + format!("{input}_") } else { input } } -// the function signature is not covered while the whole body is covered - looks like a bug in coverage tool -// frb-coverage:ignore-start -fn check_for_keywords(v: &[String]) -> anyhow::Result<()> { - // frb-coverage:ignore-end - if let Some(s) = v.iter().find(|s| DART_KEYWORDS.contains(&s.as_str())) { - bail!("Api name cannot be a dart keyword: {}", s); - }; - Ok(()) -} - // https://dart.dev/guides/language/language-tour#keywords const DART_KEYWORDS: [&str; 63] = [ "abstract", From 892b6e1ce4d9a3372d04c2c353d7c037f36aafa9 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:23:29 +0800 Subject: [PATCH 24/36] feat: more --- .../codegen/generator/api_dart/spec_generator/class/field.rs | 4 ++-- .../api_dart/spec_generator/class/ty/enumeration_simple.rs | 4 ++-- frb_codegen/src/library/utils/dart_keywords.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/field.rs b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/field.rs index 26ca8d865c..3220e5e017 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/field.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/field.rs @@ -2,7 +2,7 @@ use crate::codegen::ir::mir::default::MirDefaultValue; use crate::codegen::ir::mir::field::MirField; use crate::codegen::ir::mir::ty::delegate::MirTypeDelegate; use crate::codegen::ir::mir::ty::MirType; -use crate::utils::dart_keywords::make_string_keyword_safe; +use crate::utils::dart_keywords; use convert_case::{Case, Casing}; use std::borrow::Cow; @@ -61,7 +61,7 @@ fn default_value_to_dart_style(value: &str) -> String { format!( "{}.{}", enum_name, - make_string_keyword_safe(variant_name.to_string()).to_case(Case::Camel) + dart_keywords::escape(variant_name.to_case(Case::Camel)) ) } _ => value.to_string(), diff --git a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_simple.rs b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_simple.rs index 4c97475b06..17d94ce4aa 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_simple.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_simple.rs @@ -3,8 +3,8 @@ use crate::codegen::generator::api_dart::spec_generator::misc::generate_dart_com use crate::codegen::ir::mir::ty::enumeration::{MirEnum, MirEnumVariant}; use crate::library::codegen::generator::api_dart::spec_generator::base::*; use crate::utils::basic_code::dart_header_code::DartHeaderCode; -use crate::utils::dart_keywords::make_string_keyword_safe; use itertools::Itertools; +use crate::utils::dart_keywords; impl<'a> EnumRefApiDartGenerator<'a> { pub(crate) fn generate_mode_simple( @@ -41,7 +41,7 @@ impl<'a> EnumRefApiDartGenerator<'a> { fn generate_mode_simple_variant(&self, variant: &MirEnumVariant) -> String { let variant_name = if self.context.config.dart_enums_style { - make_string_keyword_safe(variant.name.dart_style()) + dart_keywords::escape(variant.name.dart_style()) } else { variant.name.rust_style().to_string() }; diff --git a/frb_codegen/src/library/utils/dart_keywords.rs b/frb_codegen/src/library/utils/dart_keywords.rs index c07e1f62f2..c209e62eac 100644 --- a/frb_codegen/src/library/utils/dart_keywords.rs +++ b/frb_codegen/src/library/utils/dart_keywords.rs @@ -1,4 +1,4 @@ -pub(crate) fn make_string_keyword_safe(input: String) -> String { +pub(crate) fn escape(input: String) -> String { if DART_KEYWORDS.contains(&input.as_str()) { format!("{input}_") } else { From 6c73254b1dec1bcf39daa1e917d52d5cf657bfc0 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:23:57 +0800 Subject: [PATCH 25/36] feat: call --- frb_codegen/src/library/codegen/ir/mir/ident.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index d0f76a1f88..5f177eb971 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -1,5 +1,5 @@ use crate::codegen::generator::codec::sse::lang::Lang; -use crate::utils::cbindgen_keywords; +use crate::utils::{cbindgen_keywords, dart_keywords}; use convert_case::{Case, Casing}; crate::mir! { @@ -62,7 +62,9 @@ fn convert_rust_to_c_style(raw: &str) -> String { } fn convert_rust_to_dart_style(raw: &str) -> String { - strip_prefix_rhash(raw).to_case(Case::Camel) + let ans = strip_prefix_rhash(raw).to_case(Case::Camel); + let ans = dart_keywords::escape(ans); + ans } fn strip_prefix_rhash(raw: &str) -> &str { From 87a30e68d80eda3fd68a01c363471d0d69ecde13 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:24:53 +0800 Subject: [PATCH 26/36] feat: more demo --- frb_example/dart_minimal/rust/src/api/minimal.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/frb_example/dart_minimal/rust/src/api/minimal.rs b/frb_example/dart_minimal/rust/src/api/minimal.rs index cd1e4f2d5c..4562a13ba8 100644 --- a/frb_example/dart_minimal/rust/src/api/minimal.rs +++ b/frb_example/dart_minimal/rust/src/api/minimal.rs @@ -12,7 +12,7 @@ pub fn minimal_adder(a: i32, b: i32) -> i32 { #[frb] pub struct StructWithFieldRenameTwinNormal { #[frb(name = "renamed_field")] - class: i32, + pub class: i32, } pub fn func_for_struct_with_field_rename_twin_normal( @@ -20,3 +20,14 @@ pub fn func_for_struct_with_field_rename_twin_normal( ) -> StructWithFieldRenameTwinNormal { arg } + +pub struct StructWithDartKeywordFieldTwinNormal { + pub class: i32, + pub int: i64, +} + +pub fn func_for_struct_with_dart_keyword_field_twin_normal( + arg: StructWithDartKeywordFieldTwinNormal, +) -> StructWithDartKeywordFieldTwinNormal { + arg +} From f0025bc6f42e1dc618201d8c2103e5e2aa847648 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:26:34 +0800 Subject: [PATCH 27/36] chore: demo --- frb_example/dart_minimal/frb_generated.h | 12 ++ .../lib/src/rust/api/minimal.dart | 28 ++++ .../lib/src/rust/frb_generated.dart | 112 +++++++++++++++- .../lib/src/rust/frb_generated.io.dart | 126 ++++++++++++++++++ .../lib/src/rust/frb_generated.web.dart | 67 ++++++++++ .../dart_minimal/rust/src/api/minimal.rs | 2 +- .../dart_minimal/rust/src/frb_generated.io.rs | 56 ++++++++ .../dart_minimal/rust/src/frb_generated.rs | 87 +++++++++++- .../rust/src/frb_generated.web.rs | 34 +++++ 9 files changed, 521 insertions(+), 3 deletions(-) diff --git a/frb_example/dart_minimal/frb_generated.h b/frb_example/dart_minimal/frb_generated.h index a6e9c7ffe1..57e630ab9a 100644 --- a/frb_example/dart_minimal/frb_generated.h +++ b/frb_example/dart_minimal/frb_generated.h @@ -14,10 +14,18 @@ void store_dart_post_cobject(DartPostCObjectFnType ptr); // EXTRA END typedef struct _Dart_Handle* Dart_Handle; +typedef struct wire_cst_struct_with_dart_keyword_field_twin_normal { + int32_t class_; + int64_t interface; +} wire_cst_struct_with_dart_keyword_field_twin_normal; + typedef struct wire_cst_struct_with_field_rename_twin_normal { int32_t class_; } wire_cst_struct_with_field_rename_twin_normal; +void frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal(int64_t port_, + struct wire_cst_struct_with_dart_keyword_field_twin_normal *arg); + void frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal(int64_t port_, struct wire_cst_struct_with_field_rename_twin_normal *arg); @@ -27,10 +35,14 @@ void frbgen_frb_example_dart_minimal_wire__crate__api__minimal__minimal_adder(in int32_t a, int32_t b); +struct wire_cst_struct_with_dart_keyword_field_twin_normal *frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal(void); + struct wire_cst_struct_with_field_rename_twin_normal *frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_field_rename_twin_normal(void); static int64_t dummy_method_to_enforce_bundling(void) { int64_t dummy_var = 0; + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_field_rename_twin_normal); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_wire__crate__api__minimal__init_app); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_wire__crate__api__minimal__minimal_adder); diff --git a/frb_example/dart_minimal/lib/src/rust/api/minimal.dart b/frb_example/dart_minimal/lib/src/rust/api/minimal.dart index 37a0136820..89db7c1fa9 100644 --- a/frb_example/dart_minimal/lib/src/rust/api/minimal.dart +++ b/frb_example/dart_minimal/lib/src/rust/api/minimal.dart @@ -14,6 +14,34 @@ Future funcForStructWithFieldRenameTwinNormal( RustLib.instance.api .crateApiMinimalFuncForStructWithFieldRenameTwinNormal(arg: arg); +Future + funcForStructWithDartKeywordFieldTwinNormal( + {required StructWithDartKeywordFieldTwinNormal arg}) => + RustLib.instance.api + .crateApiMinimalFuncForStructWithDartKeywordFieldTwinNormal( + arg: arg); + +class StructWithDartKeywordFieldTwinNormal { + final int class_; + final PlatformInt64 interface_; + + const StructWithDartKeywordFieldTwinNormal({ + required this.class_, + required this.interface_, + }); + + @override + int get hashCode => class_.hashCode ^ interface_.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithDartKeywordFieldTwinNormal && + runtimeType == other.runtimeType && + class_ == other.class_ && + interface_ == other.interface_; +} + class StructWithFieldRenameTwinNormal { final int renamed_field; diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.dart index 62e15cf0d4..d2510e5de6 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.dart @@ -57,7 +57,7 @@ class RustLib extends BaseEntrypoint { String get codegenVersion => '2.0.0-dev.38'; @override - int get rustContentHash => 309815666; + int get rustContentHash => 1132682991; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -68,6 +68,10 @@ class RustLib extends BaseEntrypoint { } abstract class RustLibApi extends BaseApi { + Future + crateApiMinimalFuncForStructWithDartKeywordFieldTwinNormal( + {required StructWithDartKeywordFieldTwinNormal arg}); + Future crateApiMinimalFuncForStructWithFieldRenameTwinNormal( {required StructWithFieldRenameTwinNormal arg}); @@ -85,6 +89,38 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { required super.portManager, }); + @override + Future + crateApiMinimalFuncForStructWithDartKeywordFieldTwinNormal( + {required StructWithDartKeywordFieldTwinNormal arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + arg); + return wire + .wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_struct_with_dart_keyword_field_twin_normal, + decodeErrorData: null, + ), + constMeta: + kCrateApiMinimalFuncForStructWithDartKeywordFieldTwinNormalConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiMinimalFuncForStructWithDartKeywordFieldTwinNormalConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_dart_keyword_field_twin_normal", + argNames: ["arg"], + ); + @override Future crateApiMinimalFuncForStructWithFieldRenameTwinNormal( @@ -160,6 +196,14 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["a", "b"], ); + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_dart_keyword_field_twin_normal(raw); + } + @protected StructWithFieldRenameTwinNormal dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw) { @@ -173,6 +217,25 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return raw as int; } + @protected + PlatformInt64 dco_decode_i_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeI64(raw); + } + + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return StructWithDartKeywordFieldTwinNormal( + class_: dco_decode_i_32(arr[0]), + interface_: dco_decode_i_64(arr[1]), + ); + } + @protected StructWithFieldRenameTwinNormal dco_decode_struct_with_field_rename_twin_normal(dynamic raw) { @@ -191,6 +254,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return; } + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_dart_keyword_field_twin_normal( + deserializer)); + } + @protected StructWithFieldRenameTwinNormal sse_decode_box_autoadd_struct_with_field_rename_twin_normal( @@ -205,6 +277,23 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return deserializer.buffer.getInt32(); } + @protected + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getPlatformInt64(); + } + + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_class_ = sse_decode_i_32(deserializer); + var var_interface_ = sse_decode_i_64(deserializer); + return StructWithDartKeywordFieldTwinNormal( + class_: var_class_, interface_: var_interface_); + } + @protected StructWithFieldRenameTwinNormal sse_decode_struct_with_field_rename_twin_normal( @@ -237,6 +326,13 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return raw; } + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_dart_keyword_field_twin_normal(self, serializer); + } + @protected void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( StructWithFieldRenameTwinNormal self, SseSerializer serializer) { @@ -250,6 +346,20 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { serializer.buffer.putInt32(self); } + @protected + void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putPlatformInt64(self); + } + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.class_, serializer); + sse_encode_i_64(self.interface_, serializer); + } + @protected void sse_encode_struct_with_field_rename_twin_normal( StructWithFieldRenameTwinNormal self, SseSerializer serializer) { diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart index 683d369607..5ad6c01b48 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart @@ -18,6 +18,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { required super.portManager, }); + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + dynamic raw); + @protected StructWithFieldRenameTwinNormal dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); @@ -25,6 +30,13 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected int dco_decode_i_32(dynamic raw); + @protected + PlatformInt64 dco_decode_i_64(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw); + @protected StructWithFieldRenameTwinNormal dco_decode_struct_with_field_rename_twin_normal(dynamic raw); @@ -32,6 +44,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void dco_decode_unit(dynamic raw); + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + @protected StructWithFieldRenameTwinNormal sse_decode_box_autoadd_struct_with_field_rename_twin_normal( @@ -40,6 +57,14 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected int sse_decode_i_32(SseDeserializer deserializer); + @protected + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + @protected StructWithFieldRenameTwinNormal sse_decode_struct_with_field_rename_twin_normal( @@ -51,6 +76,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected bool sse_decode_bool(SseDeserializer deserializer); + @protected + ffi.Pointer + cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = + wire.cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal(); + cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_normal( + raw, ptr.ref); + return ptr; + } + @protected ffi.Pointer cst_encode_box_autoadd_struct_with_field_rename_twin_normal( @@ -61,6 +98,22 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return ptr; } + @protected + int cst_encode_i_64(PlatformInt64 raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.toInt(); + } + + @protected + void + cst_api_fill_to_wire_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal apiObj, + ffi.Pointer + wireObj) { + cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_normal( + apiObj, wireObj.ref); + } + @protected void cst_api_fill_to_wire_box_autoadd_struct_with_field_rename_twin_normal( StructWithFieldRenameTwinNormal apiObj, @@ -69,6 +122,14 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { apiObj, wireObj.ref); } + @protected + void cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal apiObj, + wire_cst_struct_with_dart_keyword_field_twin_normal wireObj) { + wireObj.class_ = cst_encode_i_32(apiObj.class_); + wireObj.interface = cst_encode_i_64(apiObj.interface_); + } + @protected void cst_api_fill_to_wire_struct_with_field_rename_twin_normal( StructWithFieldRenameTwinNormal apiObj, @@ -82,6 +143,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void cst_encode_unit(void raw); + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( StructWithFieldRenameTwinNormal self, SseSerializer serializer); @@ -89,6 +154,13 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_i_32(int self, SseSerializer serializer); + @protected + void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + @protected void sse_encode_struct_with_field_rename_twin_normal( StructWithFieldRenameTwinNormal self, SseSerializer serializer); @@ -141,6 +213,33 @@ class RustLibWire implements BaseWire { late final _store_dart_post_cobject = _store_dart_post_cobjectPtr .asFunction(); + void + wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( + int port_, + ffi.Pointer arg, + ) { + return _wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( + port_, + arg, + ); + } + + late final _wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normalPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_normal>)>>( + 'frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal'); + late final _wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal = + _wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normalPtr + .asFunction< + void Function( + int, + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_normal>)>(); + void wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( int port_, ffi.Pointer arg, @@ -201,6 +300,24 @@ class RustLibWire implements BaseWire { _wire__crate__api__minimal__minimal_adderPtr .asFunction(); + ffi.Pointer + cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal() { + return _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal(); + } + + late final _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normalPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_normal> + Function()>>( + 'frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal'); + late final _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal = + _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normalPtr + .asFunction< + ffi.Pointer + Function()>(); + ffi.Pointer cst_new_box_autoadd_struct_with_field_rename_twin_normal() { return _cst_new_box_autoadd_struct_with_field_rename_twin_normal(); @@ -236,6 +353,15 @@ typedef DartDartPostCObjectFnTypeFunction = bool Function( typedef DartPort = ffi.Int64; typedef DartDartPort = int; +final class wire_cst_struct_with_dart_keyword_field_twin_normal + extends ffi.Struct { + @ffi.Int32() + external int class_; + + @ffi.Int64() + external int interface1; +} + final class wire_cst_struct_with_field_rename_twin_normal extends ffi.Struct { @ffi.Int32() external int class_; diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart index d5be5b059f..c3f7395c9a 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart @@ -20,6 +20,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { required super.portManager, }); + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + dynamic raw); + @protected StructWithFieldRenameTwinNormal dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); @@ -27,6 +32,13 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected int dco_decode_i_32(dynamic raw); + @protected + PlatformInt64 dco_decode_i_64(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw); + @protected StructWithFieldRenameTwinNormal dco_decode_struct_with_field_rename_twin_normal(dynamic raw); @@ -34,6 +46,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void dco_decode_unit(dynamic raw); + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + @protected StructWithFieldRenameTwinNormal sse_decode_box_autoadd_struct_with_field_rename_twin_normal( @@ -42,6 +59,14 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected int sse_decode_i_32(SseDeserializer deserializer); + @protected + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + @protected StructWithFieldRenameTwinNormal sse_decode_struct_with_field_rename_twin_normal( @@ -53,6 +78,14 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected bool sse_decode_bool(SseDeserializer deserializer); + @protected + List + cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_struct_with_dart_keyword_field_twin_normal(raw); + } + @protected List cst_encode_box_autoadd_struct_with_field_rename_twin_normal( StructWithFieldRenameTwinNormal raw) { @@ -60,6 +93,19 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return cst_encode_struct_with_field_rename_twin_normal(raw); } + @protected + Object cst_encode_i_64(PlatformInt64 raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return castNativeBigInt(raw); + } + + @protected + List cst_encode_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_i_32(raw.class_), cst_encode_i_64(raw.interface_)]; + } + @protected List cst_encode_struct_with_field_rename_twin_normal( StructWithFieldRenameTwinNormal raw) { @@ -73,6 +119,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void cst_encode_unit(void raw); + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( StructWithFieldRenameTwinNormal self, SseSerializer serializer); @@ -80,6 +130,13 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_i_32(int self, SseSerializer serializer); + @protected + void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + @protected void sse_encode_struct_with_field_rename_twin_normal( StructWithFieldRenameTwinNormal self, SseSerializer serializer); @@ -96,6 +153,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { class RustLibWire implements BaseWire { RustLibWire.fromExternalLibrary(ExternalLibrary lib); + void wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( + NativePortType port_, List arg) => + wasmModule + .wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( + port_, arg); + void wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( NativePortType port_, List arg) => wasmModule @@ -116,6 +179,10 @@ external RustLibWasmModule get wasmModule; @JS() @anonymous class RustLibWasmModule { + external void + wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( + NativePortType port_, List arg); + external void wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( NativePortType port_, List arg); diff --git a/frb_example/dart_minimal/rust/src/api/minimal.rs b/frb_example/dart_minimal/rust/src/api/minimal.rs index 4562a13ba8..d871f5e26f 100644 --- a/frb_example/dart_minimal/rust/src/api/minimal.rs +++ b/frb_example/dart_minimal/rust/src/api/minimal.rs @@ -23,7 +23,7 @@ pub fn func_for_struct_with_field_rename_twin_normal( pub struct StructWithDartKeywordFieldTwinNormal { pub class: i32, - pub int: i64, + pub interface: i64, } pub fn func_for_struct_with_dart_keyword_field_twin_normal( diff --git a/frb_example/dart_minimal/rust/src/frb_generated.io.rs b/frb_example/dart_minimal/rust/src/frb_generated.io.rs index a55e316093..7cc46480ac 100644 --- a/frb_example/dart_minimal/rust/src/frb_generated.io.rs +++ b/frb_example/dart_minimal/rust/src/frb_generated.io.rs @@ -14,6 +14,16 @@ flutter_rust_bridge::frb_generated_boilerplate_io!(); // Section: dart2rust +impl CstDecode + for *mut wire_cst_struct_with_dart_keyword_field_twin_normal +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::minimal::StructWithDartKeywordFieldTwinNormal { + 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_field_rename_twin_normal { @@ -23,6 +33,17 @@ impl CstDecode CstDecode::::cst_decode(*wrap).into() } } +impl CstDecode + for wire_cst_struct_with_dart_keyword_field_twin_normal +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::minimal::StructWithDartKeywordFieldTwinNormal { + crate::api::minimal::StructWithDartKeywordFieldTwinNormal { + class: self.class.cst_decode(), + interface: self.interface.cst_decode(), + } + } +} impl CstDecode for wire_cst_struct_with_field_rename_twin_normal { @@ -33,6 +54,19 @@ impl CstDecode } } } +impl NewWithNullPtr for wire_cst_struct_with_dart_keyword_field_twin_normal { + fn new_with_null_ptr() -> Self { + Self { + class: Default::default(), + interface: Default::default(), + } + } +} +impl Default for wire_cst_struct_with_dart_keyword_field_twin_normal { + fn default() -> Self { + Self::new_with_null_ptr() + } +} impl NewWithNullPtr for wire_cst_struct_with_field_rename_twin_normal { fn new_with_null_ptr() -> Self { Self { @@ -46,6 +80,14 @@ impl Default for wire_cst_struct_with_field_rename_twin_normal { } } +#[no_mangle] +pub extern "C" fn frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( + port_: i64, + arg: *mut wire_cst_struct_with_dart_keyword_field_twin_normal, +) { + wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal_impl(port_, arg) +} + #[no_mangle] pub extern "C" fn frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( port_: i64, @@ -68,6 +110,14 @@ pub extern "C" fn frbgen_frb_example_dart_minimal_wire__crate__api__minimal__min wire__crate__api__minimal__minimal_adder_impl(port_, a, b) } +#[no_mangle] +pub extern "C" fn frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal( +) -> *mut wire_cst_struct_with_dart_keyword_field_twin_normal { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_struct_with_dart_keyword_field_twin_normal::new_with_null_ptr(), + ) +} + #[no_mangle] pub extern "C" fn frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_field_rename_twin_normal( ) -> *mut wire_cst_struct_with_field_rename_twin_normal { @@ -76,6 +126,12 @@ pub extern "C" fn frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_wit ) } +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_struct_with_dart_keyword_field_twin_normal { + class: i32, + interface: i64, +} #[repr(C)] #[derive(Clone, Copy)] pub struct wire_cst_struct_with_field_rename_twin_normal { diff --git a/frb_example/dart_minimal/rust/src/frb_generated.rs b/frb_example/dart_minimal/rust/src/frb_generated.rs index 6f4092b1d3..6bd34045ee 100644 --- a/frb_example/dart_minimal/rust/src/frb_generated.rs +++ b/frb_example/dart_minimal/rust/src/frb_generated.rs @@ -33,7 +33,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_auto_opaque = RustAutoOpaqueNom, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.38"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 309815666; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1132682991; // Section: executor @@ -41,6 +41,30 @@ flutter_rust_bridge::frb_generated_default_handler!(); // Section: wire_funcs +fn wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "func_for_struct_with_dart_keyword_field_twin_normal", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_arg = arg.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok( + crate::api::minimal::func_for_struct_with_dart_keyword_field_twin_normal( + api_arg, + ), + ) + })()) + } + }, + ) +} fn wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal_impl( port_: flutter_rust_bridge::for_generated::MessagePort, arg: impl CstDecode, @@ -114,6 +138,12 @@ impl CstDecode for i32 { self } } +impl CstDecode for i64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> i64 { + self + } +} impl SseDecode for i32 { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -121,6 +151,25 @@ impl SseDecode for i32 { } } +impl SseDecode for i64 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_i64::().unwrap() + } +} + +impl SseDecode for crate::api::minimal::StructWithDartKeywordFieldTwinNormal { + // 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_class_ = ::sse_decode(deserializer); + let mut var_interface_ = ::sse_decode(deserializer); + return crate::api::minimal::StructWithDartKeywordFieldTwinNormal { + class: var_class_, + interface: var_interface_, + }; + } +} + impl SseDecode for crate::api::minimal::StructWithFieldRenameTwinNormal { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -170,6 +219,27 @@ fn pde_ffi_dispatcher_sync_impl( // Section: rust2dart +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::minimal::StructWithDartKeywordFieldTwinNormal { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.class.into_into_dart().into_dart(), + self.interface.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::minimal::StructWithDartKeywordFieldTwinNormal +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::minimal::StructWithDartKeywordFieldTwinNormal +{ + fn into_into_dart(self) -> crate::api::minimal::StructWithDartKeywordFieldTwinNormal { + self + } +} // Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::api::minimal::StructWithFieldRenameTwinNormal { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { @@ -195,6 +265,21 @@ impl SseEncode for i32 { } } +impl SseEncode for i64 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer.cursor.write_i64::(self).unwrap(); + } +} + +impl SseEncode for crate::api::minimal::StructWithDartKeywordFieldTwinNormal { + // 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.class, serializer); + ::sse_encode(self.interface, serializer); + } +} + impl SseEncode for crate::api::minimal::StructWithFieldRenameTwinNormal { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { diff --git a/frb_example/dart_minimal/rust/src/frb_generated.web.rs b/frb_example/dart_minimal/rust/src/frb_generated.web.rs index 65739c578c..9ac8b4d10b 100644 --- a/frb_example/dart_minimal/rust/src/frb_generated.web.rs +++ b/frb_example/dart_minimal/rust/src/frb_generated.web.rs @@ -16,6 +16,26 @@ flutter_rust_bridge::frb_generated_boilerplate_web!(); // Section: dart2rust +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::minimal::StructWithDartKeywordFieldTwinNormal { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::api::minimal::StructWithDartKeywordFieldTwinNormal { + class: self_.get(0).cst_decode(), + interface: self_.get(1).cst_decode(), + } + } +} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -41,6 +61,20 @@ impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValu self.unchecked_into_f64() 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) -> i64 { + ::std::convert::TryInto::::try_into(self).unwrap() as _ + } +} + +#[wasm_bindgen] +pub fn wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal_impl(port_, arg) +} #[wasm_bindgen] pub fn wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( From 7f8280ad7fc00bdab778f5966d7b359e5282c0ad Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:28:35 +0800 Subject: [PATCH 28/36] fix: err --- frb_codegen/src/library/codegen/ir/mir/ident.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index 5f177eb971..041b1c8f44 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -54,6 +54,9 @@ fn convert_rust_to_c_style(raw: &str) -> String { if &ans == "async" { ans = "async1".to_owned(); } + if &ans == "interface" { + ans = "interface1".to_owned(); + } // match behavior of cbindgen cbindgen_keywords::escape(&mut ans); From bacf2763f18b930ff2fb660781850a216fee6480 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:29:45 +0800 Subject: [PATCH 29/36] chore: codegen --- frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart index 5ad6c01b48..c3db31c054 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart @@ -127,7 +127,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithDartKeywordFieldTwinNormal apiObj, wire_cst_struct_with_dart_keyword_field_twin_normal wireObj) { wireObj.class_ = cst_encode_i_32(apiObj.class_); - wireObj.interface = cst_encode_i_64(apiObj.interface_); + wireObj.interface1 = cst_encode_i_64(apiObj.interface_); } @protected From d7e8c66139373e74fd30265840e47a1f731a54bf Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:30:45 +0800 Subject: [PATCH 30/36] chore: codegen --- .../dart_minimal/flutter_rust_bridge.yaml | 2 +- frb_example/dart_minimal/frb_generated.h | 52 +--- .../lib/src/rust/frb_generated.dart | 61 ++--- .../lib/src/rust/frb_generated.io.dart | 247 ------------------ .../lib/src/rust/frb_generated.web.dart | 75 +----- .../dart_minimal/rust/src/frb_generated.io.rs | 126 --------- .../dart_minimal/rust/src/frb_generated.rs | 116 +++++--- .../rust/src/frb_generated.web.rs | 84 ------ 8 files changed, 114 insertions(+), 649 deletions(-) diff --git a/frb_example/dart_minimal/flutter_rust_bridge.yaml b/frb_example/dart_minimal/flutter_rust_bridge.yaml index c6adde6f5f..feb59b4f86 100644 --- a/frb_example/dart_minimal/flutter_rust_bridge.yaml +++ b/frb_example/dart_minimal/flutter_rust_bridge.yaml @@ -6,4 +6,4 @@ dump_all: true local: true # TODO temp -full_dep: true +#full_dep: true diff --git a/frb_example/dart_minimal/frb_generated.h b/frb_example/dart_minimal/frb_generated.h index 57e630ab9a..ad87ade833 100644 --- a/frb_example/dart_minimal/frb_generated.h +++ b/frb_example/dart_minimal/frb_generated.h @@ -1,51 +1 @@ -#include -#include -#include -// EXTRA BEGIN -typedef struct DartCObject *WireSyncRust2DartDco; -typedef struct WireSyncRust2DartSse { - uint8_t *ptr; - int32_t len; -} WireSyncRust2DartSse; - -typedef int64_t DartPort; -typedef bool (*DartPostCObjectFnType)(DartPort port_id, void *message); -void store_dart_post_cobject(DartPostCObjectFnType ptr); -// EXTRA END -typedef struct _Dart_Handle* Dart_Handle; - -typedef struct wire_cst_struct_with_dart_keyword_field_twin_normal { - int32_t class_; - int64_t interface; -} wire_cst_struct_with_dart_keyword_field_twin_normal; - -typedef struct wire_cst_struct_with_field_rename_twin_normal { - int32_t class_; -} wire_cst_struct_with_field_rename_twin_normal; - -void frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal(int64_t port_, - struct wire_cst_struct_with_dart_keyword_field_twin_normal *arg); - -void frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal(int64_t port_, - struct wire_cst_struct_with_field_rename_twin_normal *arg); - -void frbgen_frb_example_dart_minimal_wire__crate__api__minimal__init_app(int64_t port_); - -void frbgen_frb_example_dart_minimal_wire__crate__api__minimal__minimal_adder(int64_t port_, - int32_t a, - int32_t b); - -struct wire_cst_struct_with_dart_keyword_field_twin_normal *frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal(void); - -struct wire_cst_struct_with_field_rename_twin_normal *frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_field_rename_twin_normal(void); -static int64_t dummy_method_to_enforce_bundling(void) { - int64_t dummy_var = 0; - dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal); - dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_field_rename_twin_normal); - dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal); - dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal); - dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_wire__crate__api__minimal__init_app); - dummy_var ^= ((int64_t) (void*) frbgen_frb_example_dart_minimal_wire__crate__api__minimal__minimal_adder); - dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); - return dummy_var; -} +// Nothing when using full_dep=false mode \ No newline at end of file diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.dart index d2510e5de6..9b35a35d0c 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.dart @@ -95,16 +95,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { {required StructWithDartKeywordFieldTwinNormal arg}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = - cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - arg); - return wire - .wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( - port_, arg0); + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + arg, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 1, port: port_); }, - codec: DcoCodec( + codec: SseCodec( decodeSuccessData: - dco_decode_struct_with_dart_keyword_field_twin_normal, + sse_decode_struct_with_dart_keyword_field_twin_normal, decodeErrorData: null, ), constMeta: @@ -127,14 +126,14 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { {required StructWithFieldRenameTwinNormal arg}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = - cst_encode_box_autoadd_struct_with_field_rename_twin_normal(arg); - return wire - .wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( - port_, arg0); + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_field_rename_twin_normal( + arg, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 2, port: port_); }, - codec: DcoCodec( - decodeSuccessData: dco_decode_struct_with_field_rename_twin_normal, + codec: SseCodec( + decodeSuccessData: sse_decode_struct_with_field_rename_twin_normal, decodeErrorData: null, ), constMeta: @@ -155,10 +154,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { Future crateApiMinimalInitApp() { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__api__minimal__init_app(port_); + final serializer = SseSerializer(generalizedFrbRustBinding); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 3, port: port_); }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, + codec: SseCodec( + decodeSuccessData: sse_decode_unit, decodeErrorData: null, ), constMeta: kCrateApiMinimalInitAppConstMeta, @@ -176,12 +177,14 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { Future crateApiMinimalMinimalAdder({required int a, required int b}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_i_32(a); - var arg1 = cst_encode_i_32(b); - return wire.wire__crate__api__minimal__minimal_adder(port_, arg0, arg1); + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_i_32(a, serializer); + sse_encode_i_32(b, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 4, port: port_); }, - codec: DcoCodec( - decodeSuccessData: dco_decode_i_32, + codec: SseCodec( + decodeSuccessData: sse_decode_i_32, decodeErrorData: null, ), constMeta: kCrateApiMinimalMinimalAdderConstMeta, @@ -314,18 +317,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return deserializer.buffer.getUint8() != 0; } - @protected - int cst_encode_i_32(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; - } - - @protected - void cst_encode_unit(void raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; - } - @protected void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer) { diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart index c3db31c054..e71164fce9 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart @@ -76,73 +76,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected bool sse_decode_bool(SseDeserializer deserializer); - @protected - ffi.Pointer - cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - StructWithDartKeywordFieldTwinNormal raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = - wire.cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal(); - cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_normal( - raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - cst_encode_box_autoadd_struct_with_field_rename_twin_normal( - StructWithFieldRenameTwinNormal raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_struct_with_field_rename_twin_normal(); - cst_api_fill_to_wire_struct_with_field_rename_twin_normal(raw, ptr.ref); - return ptr; - } - - @protected - int cst_encode_i_64(PlatformInt64 raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.toInt(); - } - - @protected - void - cst_api_fill_to_wire_box_autoadd_struct_with_dart_keyword_field_twin_normal( - StructWithDartKeywordFieldTwinNormal apiObj, - ffi.Pointer - wireObj) { - cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_normal( - apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_struct_with_field_rename_twin_normal( - StructWithFieldRenameTwinNormal apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_struct_with_field_rename_twin_normal( - apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_normal( - StructWithDartKeywordFieldTwinNormal apiObj, - wire_cst_struct_with_dart_keyword_field_twin_normal wireObj) { - wireObj.class_ = cst_encode_i_32(apiObj.class_); - wireObj.interface1 = cst_encode_i_64(apiObj.interface_); - } - - @protected - void cst_api_fill_to_wire_struct_with_field_rename_twin_normal( - StructWithFieldRenameTwinNormal apiObj, - wire_cst_struct_with_field_rename_twin_normal wireObj) { - wireObj.class_ = cst_encode_i_32(apiObj.renamed_field); - } - - @protected - int cst_encode_i_32(int raw); - - @protected - void cst_encode_unit(void raw); - @protected void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); @@ -174,13 +107,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { // Section: wire_class -// ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names -// AUTO GENERATED FILE, DO NOT EDIT. -// -// Generated by `package:ffigen`. -// ignore_for_file: type=lint - -/// generated by flutter_rust_bridge class RustLibWire implements BaseWire { factory RustLibWire.fromExternalLibrary(ExternalLibrary lib) => RustLibWire(lib.ffiDynamicLibrary); @@ -192,177 +118,4 @@ class RustLibWire implements BaseWire { /// The symbols are looked up in [dynamicLibrary]. RustLibWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - RustLibWire.fromLookup( - ffi.Pointer Function(String symbolName) - lookup) - : _lookup = lookup; - - void store_dart_post_cobject( - DartPostCObjectFnType ptr, - ) { - return _store_dart_post_cobject( - ptr, - ); - } - - late final _store_dart_post_cobjectPtr = - _lookup>( - 'store_dart_post_cobject'); - late final _store_dart_post_cobject = _store_dart_post_cobjectPtr - .asFunction(); - - void - wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( - int port_, - ffi.Pointer arg, - ) { - return _wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( - port_, - arg, - ); - } - - late final _wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normalPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer< - wire_cst_struct_with_dart_keyword_field_twin_normal>)>>( - 'frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal'); - late final _wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal = - _wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normalPtr - .asFunction< - void Function( - int, - ffi.Pointer< - wire_cst_struct_with_dart_keyword_field_twin_normal>)>(); - - void wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( - int port_, - ffi.Pointer arg, - ) { - return _wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( - port_, - arg, - ); - } - - late final _wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normalPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer< - wire_cst_struct_with_field_rename_twin_normal>)>>( - 'frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal'); - late final _wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal = - _wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normalPtr - .asFunction< - void Function( - int, - ffi.Pointer< - wire_cst_struct_with_field_rename_twin_normal>)>(); - - void wire__crate__api__minimal__init_app( - int port_, - ) { - return _wire__crate__api__minimal__init_app( - port_, - ); - } - - late final _wire__crate__api__minimal__init_appPtr = _lookup< - ffi.NativeFunction>( - 'frbgen_frb_example_dart_minimal_wire__crate__api__minimal__init_app'); - late final _wire__crate__api__minimal__init_app = - _wire__crate__api__minimal__init_appPtr.asFunction(); - - void wire__crate__api__minimal__minimal_adder( - int port_, - int a, - int b, - ) { - return _wire__crate__api__minimal__minimal_adder( - port_, - a, - b, - ); - } - - late final _wire__crate__api__minimal__minimal_adderPtr = _lookup< - ffi - .NativeFunction>( - 'frbgen_frb_example_dart_minimal_wire__crate__api__minimal__minimal_adder'); - late final _wire__crate__api__minimal__minimal_adder = - _wire__crate__api__minimal__minimal_adderPtr - .asFunction(); - - ffi.Pointer - cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal() { - return _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal(); - } - - late final _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normalPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer< - wire_cst_struct_with_dart_keyword_field_twin_normal> - Function()>>( - 'frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal'); - late final _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal = - _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normalPtr - .asFunction< - ffi.Pointer - Function()>(); - - ffi.Pointer - cst_new_box_autoadd_struct_with_field_rename_twin_normal() { - return _cst_new_box_autoadd_struct_with_field_rename_twin_normal(); - } - - late final _cst_new_box_autoadd_struct_with_field_rename_twin_normalPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer - Function()>>( - 'frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_field_rename_twin_normal'); - late final _cst_new_box_autoadd_struct_with_field_rename_twin_normal = - _cst_new_box_autoadd_struct_with_field_rename_twin_normalPtr.asFunction< - ffi.Pointer - Function()>(); - - int dummy_method_to_enforce_bundling() { - return _dummy_method_to_enforce_bundling(); - } - - late final _dummy_method_to_enforce_bundlingPtr = - _lookup>( - 'dummy_method_to_enforce_bundling'); - late final _dummy_method_to_enforce_bundling = - _dummy_method_to_enforce_bundlingPtr.asFunction(); -} - -typedef DartPostCObjectFnType - = ffi.Pointer>; -typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( - DartPort port_id, ffi.Pointer message); -typedef DartDartPostCObjectFnTypeFunction = bool Function( - DartDartPort port_id, ffi.Pointer message); -typedef DartPort = ffi.Int64; -typedef DartDartPort = int; - -final class wire_cst_struct_with_dart_keyword_field_twin_normal - extends ffi.Struct { - @ffi.Int32() - external int class_; - - @ffi.Int64() - external int interface1; -} - -final class wire_cst_struct_with_field_rename_twin_normal extends ffi.Struct { - @ffi.Int32() - external int class_; } diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart index c3f7395c9a..a227f2a850 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart @@ -78,47 +78,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected bool sse_decode_bool(SseDeserializer deserializer); - @protected - List - cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - StructWithDartKeywordFieldTwinNormal raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_struct_with_dart_keyword_field_twin_normal(raw); - } - - @protected - List cst_encode_box_autoadd_struct_with_field_rename_twin_normal( - StructWithFieldRenameTwinNormal raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_struct_with_field_rename_twin_normal(raw); - } - - @protected - Object cst_encode_i_64(PlatformInt64 raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return castNativeBigInt(raw); - } - - @protected - List cst_encode_struct_with_dart_keyword_field_twin_normal( - StructWithDartKeywordFieldTwinNormal raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_i_32(raw.class_), cst_encode_i_64(raw.interface_)]; - } - - @protected - List cst_encode_struct_with_field_rename_twin_normal( - StructWithFieldRenameTwinNormal raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_i_32(raw.renamed_field)]; - } - - @protected - int cst_encode_i_32(int raw); - - @protected - void cst_encode_unit(void raw); - @protected void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); @@ -152,25 +111,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { class RustLibWire implements BaseWire { RustLibWire.fromExternalLibrary(ExternalLibrary lib); - - void wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( - NativePortType port_, List arg) => - wasmModule - .wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( - port_, arg); - - void wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( - NativePortType port_, List arg) => - wasmModule - .wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( - port_, arg); - - void wire__crate__api__minimal__init_app(NativePortType port_) => - wasmModule.wire__crate__api__minimal__init_app(port_); - - void wire__crate__api__minimal__minimal_adder( - NativePortType port_, int a, int b) => - wasmModule.wire__crate__api__minimal__minimal_adder(port_, a, b); } @JS('wasm_bindgen') @@ -178,17 +118,4 @@ external RustLibWasmModule get wasmModule; @JS() @anonymous -class RustLibWasmModule { - external void - wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( - NativePortType port_, List arg); - - external void - wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( - NativePortType port_, List arg); - - external void wire__crate__api__minimal__init_app(NativePortType port_); - - external void wire__crate__api__minimal__minimal_adder( - NativePortType port_, int a, int b); -} +class RustLibWasmModule {} diff --git a/frb_example/dart_minimal/rust/src/frb_generated.io.rs b/frb_example/dart_minimal/rust/src/frb_generated.io.rs index 7cc46480ac..7c831957c4 100644 --- a/frb_example/dart_minimal/rust/src/frb_generated.io.rs +++ b/frb_example/dart_minimal/rust/src/frb_generated.io.rs @@ -11,129 +11,3 @@ use flutter_rust_bridge::{Handler, IntoIntoDart}; // Section: boilerplate flutter_rust_bridge::frb_generated_boilerplate_io!(); - -// Section: dart2rust - -impl CstDecode - for *mut wire_cst_struct_with_dart_keyword_field_twin_normal -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::minimal::StructWithDartKeywordFieldTwinNormal { - 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_field_rename_twin_normal -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::minimal::StructWithFieldRenameTwinNormal { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode - for wire_cst_struct_with_dart_keyword_field_twin_normal -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::minimal::StructWithDartKeywordFieldTwinNormal { - crate::api::minimal::StructWithDartKeywordFieldTwinNormal { - class: self.class.cst_decode(), - interface: self.interface.cst_decode(), - } - } -} -impl CstDecode - for wire_cst_struct_with_field_rename_twin_normal -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::minimal::StructWithFieldRenameTwinNormal { - crate::api::minimal::StructWithFieldRenameTwinNormal { - class: self.class.cst_decode(), - } - } -} -impl NewWithNullPtr for wire_cst_struct_with_dart_keyword_field_twin_normal { - fn new_with_null_ptr() -> Self { - Self { - class: Default::default(), - interface: Default::default(), - } - } -} -impl Default for wire_cst_struct_with_dart_keyword_field_twin_normal { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_struct_with_field_rename_twin_normal { - fn new_with_null_ptr() -> Self { - Self { - class: Default::default(), - } - } -} -impl Default for wire_cst_struct_with_field_rename_twin_normal { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -#[no_mangle] -pub extern "C" fn frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( - port_: i64, - arg: *mut wire_cst_struct_with_dart_keyword_field_twin_normal, -) { - wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal_impl(port_, arg) -} - -#[no_mangle] -pub extern "C" fn frbgen_frb_example_dart_minimal_wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( - port_: i64, - arg: *mut wire_cst_struct_with_field_rename_twin_normal, -) { - wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal_impl(port_, arg) -} - -#[no_mangle] -pub extern "C" fn frbgen_frb_example_dart_minimal_wire__crate__api__minimal__init_app(port_: i64) { - wire__crate__api__minimal__init_app_impl(port_) -} - -#[no_mangle] -pub extern "C" fn frbgen_frb_example_dart_minimal_wire__crate__api__minimal__minimal_adder( - port_: i64, - a: i32, - b: i32, -) { - wire__crate__api__minimal__minimal_adder_impl(port_, a, b) -} - -#[no_mangle] -pub extern "C" fn frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal( -) -> *mut wire_cst_struct_with_dart_keyword_field_twin_normal { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_struct_with_dart_keyword_field_twin_normal::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_frb_example_dart_minimal_cst_new_box_autoadd_struct_with_field_rename_twin_normal( -) -> *mut wire_cst_struct_with_field_rename_twin_normal { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_struct_with_field_rename_twin_normal::new_with_null_ptr(), - ) -} - -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_struct_with_dart_keyword_field_twin_normal { - class: i32, - interface: i64, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_struct_with_field_rename_twin_normal { - class: i32, -} diff --git a/frb_example/dart_minimal/rust/src/frb_generated.rs b/frb_example/dart_minimal/rust/src/frb_generated.rs index 6bd34045ee..d3350ab59c 100644 --- a/frb_example/dart_minimal/rust/src/frb_generated.rs +++ b/frb_example/dart_minimal/rust/src/frb_generated.rs @@ -28,9 +28,9 @@ use flutter_rust_bridge::{Handler, IntoIntoDart}; // Section: boilerplate flutter_rust_bridge::frb_generated_boilerplate!( - default_stream_sink_codec = DcoCodec, - default_rust_opaque = RustOpaqueNom, - default_rust_auto_opaque = RustAutoOpaqueNom, + default_stream_sink_codec = SseCodec, + default_rust_opaque = RustOpaqueMoi, + default_rust_auto_opaque = RustAutoOpaqueMoi, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.38"; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1132682991; @@ -43,18 +43,32 @@ flutter_rust_bridge::frb_generated_default_handler!(); fn wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - arg: impl CstDecode, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "func_for_struct_with_dart_keyword_field_twin_normal", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_arg = arg.cst_decode(); + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode( + &mut deserializer, + ); + deserializer.end(); move |context| { - transform_result_dco((move || { + transform_result_sse((move || { Result::<_, ()>::Ok( crate::api::minimal::func_for_struct_with_dart_keyword_field_twin_normal( api_arg, @@ -67,18 +81,32 @@ fn wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_norma } fn wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - arg: impl CstDecode, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "func_for_struct_with_field_rename_twin_normal", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_arg = arg.cst_decode(); + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode( + &mut deserializer, + ); + deserializer.end(); move |context| { - transform_result_dco((move || { + transform_result_sse((move || { Result::<_, ()>::Ok( crate::api::minimal::func_for_struct_with_field_rename_twin_normal(api_arg), ) @@ -89,16 +117,29 @@ fn wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal_impl } fn wire__crate__api__minimal__init_app_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "init_app", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + deserializer.end(); move |context| { - transform_result_dco((move || { + transform_result_sse((move || { Result::<_, ()>::Ok({ crate::api::minimal::init_app(); }) @@ -109,20 +150,31 @@ fn wire__crate__api__minimal__init_app_impl( } fn wire__crate__api__minimal__minimal_adder_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - a: impl CstDecode, - b: impl CstDecode, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "minimal_adder", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_a = a.cst_decode(); - let api_b = b.cst_decode(); + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_a = ::sse_decode(&mut deserializer); + let api_b = ::sse_decode(&mut deserializer); + deserializer.end(); move |context| { - transform_result_dco((move || { + transform_result_sse((move || { Result::<_, ()>::Ok(crate::api::minimal::minimal_adder(api_a, api_b)) })()) } @@ -132,18 +184,6 @@ fn wire__crate__api__minimal__minimal_adder_impl( // Section: dart2rust -impl CstDecode for i32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> i32 { - self - } -} -impl CstDecode for i64 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> i64 { - self - } -} impl SseDecode for i32 { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -201,6 +241,20 @@ fn pde_ffi_dispatcher_primary_impl( ) { // Codec=Pde (Serialization + dispatch), see doc to use other codecs match func_id { + 1 => wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 2 => wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 3 => wire__crate__api__minimal__init_app_impl(port, ptr, rust_vec_len, data_len), + 4 => wire__crate__api__minimal__minimal_adder_impl(port, ptr, rust_vec_len, data_len), _ => unreachable!(), } } diff --git a/frb_example/dart_minimal/rust/src/frb_generated.web.rs b/frb_example/dart_minimal/rust/src/frb_generated.web.rs index 9ac8b4d10b..0a83f28fdd 100644 --- a/frb_example/dart_minimal/rust/src/frb_generated.web.rs +++ b/frb_example/dart_minimal/rust/src/frb_generated.web.rs @@ -13,87 +13,3 @@ use flutter_rust_bridge::{Handler, IntoIntoDart}; // Section: boilerplate flutter_rust_bridge::frb_generated_boilerplate_web!(); - -// Section: dart2rust - -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::minimal::StructWithDartKeywordFieldTwinNormal { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::api::minimal::StructWithDartKeywordFieldTwinNormal { - class: self_.get(0).cst_decode(), - interface: self_.get(1).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::minimal::StructWithFieldRenameTwinNormal { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::minimal::StructWithFieldRenameTwinNormal { - class: 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) -> i32 { - self.unchecked_into_f64() 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) -> i64 { - ::std::convert::TryInto::::try_into(self).unwrap() as _ - } -} - -#[wasm_bindgen] -pub fn wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal( - port_: flutter_rust_bridge::for_generated::MessagePort, - arg: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal_impl(port_, arg) -} - -#[wasm_bindgen] -pub fn wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal( - port_: flutter_rust_bridge::for_generated::MessagePort, - arg: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal_impl(port_, arg) -} - -#[wasm_bindgen] -pub fn wire__crate__api__minimal__init_app(port_: flutter_rust_bridge::for_generated::MessagePort) { - wire__crate__api__minimal__init_app_impl(port_) -} - -#[wasm_bindgen] -pub fn wire__crate__api__minimal__minimal_adder( - port_: flutter_rust_bridge::for_generated::MessagePort, - a: i32, - b: i32, -) { - wire__crate__api__minimal__minimal_adder_impl(port_, a, b) -} From b7efd7376967b7f335d0f4fc10537577d3970d6a Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:31:48 +0800 Subject: [PATCH 31/36] chore: mv demo --- .../dart_minimal/rust/src/api/minimal.rs | 23 ----------------- .../pure_dart/rust/src/api/structure.rs | 25 +++++++++++++++++++ 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/frb_example/dart_minimal/rust/src/api/minimal.rs b/frb_example/dart_minimal/rust/src/api/minimal.rs index d871f5e26f..517e29973f 100644 --- a/frb_example/dart_minimal/rust/src/api/minimal.rs +++ b/frb_example/dart_minimal/rust/src/api/minimal.rs @@ -8,26 +8,3 @@ pub fn init_app() { pub fn minimal_adder(a: i32, b: i32) -> i32 { a + b } - -#[frb] -pub struct StructWithFieldRenameTwinNormal { - #[frb(name = "renamed_field")] - pub class: i32, -} - -pub fn func_for_struct_with_field_rename_twin_normal( - arg: StructWithFieldRenameTwinNormal, -) -> StructWithFieldRenameTwinNormal { - arg -} - -pub struct StructWithDartKeywordFieldTwinNormal { - pub class: i32, - pub interface: i64, -} - -pub fn func_for_struct_with_dart_keyword_field_twin_normal( - arg: StructWithDartKeywordFieldTwinNormal, -) -> StructWithDartKeywordFieldTwinNormal { - arg -} diff --git a/frb_example/pure_dart/rust/src/api/structure.rs b/frb_example/pure_dart/rust/src/api/structure.rs index b5e9d80d9b..f9146d79b0 100644 --- a/frb_example/pure_dart/rust/src/api/structure.rs +++ b/frb_example/pure_dart/rust/src/api/structure.rs @@ -1,3 +1,5 @@ +use flutter_rust_bridge::frb; + pub struct StructWithZeroFieldTwinNormal {} pub fn func_struct_with_zero_field_twin_normal( @@ -42,3 +44,26 @@ pub fn func_tuple_struct_with_two_field_twin_normal( ) -> TupleStructWithTwoFieldTwinNormal { arg } + +#[frb] +pub struct StructWithFieldRenameTwinNormal { + #[frb(name = "renamed_field")] + pub class: i32, +} + +pub fn func_for_struct_with_field_rename_twin_normal( + arg: StructWithFieldRenameTwinNormal, +) -> StructWithFieldRenameTwinNormal { + arg +} + +pub struct StructWithDartKeywordFieldTwinNormal { + pub class: i32, + pub interface: i64, +} + +pub fn func_for_struct_with_dart_keyword_field_twin_normal( + arg: StructWithDartKeywordFieldTwinNormal, +) -> StructWithDartKeywordFieldTwinNormal { + arg +} From 5ecc5114b54567dd8cb523090fa78477c43b7cc4 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:43:35 +0800 Subject: [PATCH 32/36] chore: codegen --- .../class/ty/enumeration_simple.rs | 2 +- .../src/library/codegen/ir/mir/ident.rs | 4 +- .../lib/src/rust/api/minimal.dart | 51 - .../lib/src/rust/frb_generated.dart | 199 +-- .../lib/src/rust/frb_generated.io.dart | 62 - .../lib/src/rust/frb_generated.web.dart | 62 - .../dart_minimal/rust/src/frb_generated.rs | 182 +-- .../third_party/web_audio_api/context.dart | 2 +- frb_example/pure_dart/frb_generated.h | 101 ++ .../raw_string_twin_rust_async.dart | 8 +- .../raw_string_twin_rust_async_sse.dart | 8 +- .../pseudo_manual/raw_string_twin_sse.dart | 8 +- .../pseudo_manual/raw_string_twin_sync.dart | 8 +- .../raw_string_twin_sync_sse.dart | 8 +- .../structure_twin_rust_async.dart | 53 + .../structure_twin_rust_async_sse.dart | 53 + .../api/pseudo_manual/structure_twin_sse.dart | 52 + .../pseudo_manual/structure_twin_sync.dart | 51 + .../structure_twin_sync_sse.dart | 51 + .../lib/src/rust/api/raw_string.dart | 8 +- .../pure_dart/lib/src/rust/api/structure.dart | 51 + .../lib/src/rust/auxiliary/sample_types.dart | 4 +- .../pure_dart/lib/src/rust/frb_generated.dart | 1123 ++++++++++++++++- .../lib/src/rust/frb_generated.io.dart | 943 +++++++++++++- .../lib/src/rust/frb_generated.web.dart | 571 ++++++++- .../structure_twin_rust_async.rs | 25 + .../structure_twin_rust_async_sse.rs | 27 + .../api/pseudo_manual/structure_twin_sse.rs | 27 + .../api/pseudo_manual/structure_twin_sync.rs | 27 + .../pseudo_manual/structure_twin_sync_sse.rs | 29 + .../pure_dart/rust/src/frb_generated.io.rs | 395 ++++++ .../pure_dart/rust/src/frb_generated.rs | 670 +++++++++- .../pure_dart/rust/src/frb_generated.web.rs | 220 ++++ .../raw_string_twin_rust_async.dart | 8 +- .../pseudo_manual/raw_string_twin_sync.dart | 8 +- .../structure_twin_rust_async.dart | 53 + .../pseudo_manual/structure_twin_sync.dart | 51 + .../lib/src/rust/api/raw_string.dart | 8 +- .../lib/src/rust/api/structure.dart | 51 + .../lib/src/rust/auxiliary/sample_types.dart | 4 +- .../lib/src/rust/frb_generated.dart | 786 ++++++++++-- .../lib/src/rust/frb_generated.io.dart | 159 +++ .../lib/src/rust/frb_generated.web.dart | 159 +++ .../structure_twin_rust_async.rs | 25 + .../api/pseudo_manual/structure_twin_sync.rs | 27 + .../pure_dart_pde/rust/src/api/structure.rs | 25 + .../pure_dart_pde/rust/src/frb_generated.rs | 624 +++++++-- 47 files changed, 6177 insertions(+), 896 deletions(-) diff --git a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_simple.rs b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_simple.rs index 17d94ce4aa..93f5fa8389 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_simple.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/enumeration_simple.rs @@ -3,8 +3,8 @@ use crate::codegen::generator::api_dart::spec_generator::misc::generate_dart_com use crate::codegen::ir::mir::ty::enumeration::{MirEnum, MirEnumVariant}; use crate::library::codegen::generator::api_dart::spec_generator::base::*; use crate::utils::basic_code::dart_header_code::DartHeaderCode; -use itertools::Itertools; use crate::utils::dart_keywords; +use itertools::Itertools; impl<'a> EnumRefApiDartGenerator<'a> { pub(crate) fn generate_mode_simple( diff --git a/frb_codegen/src/library/codegen/ir/mir/ident.rs b/frb_codegen/src/library/codegen/ir/mir/ident.rs index 041b1c8f44..e65408f814 100644 --- a/frb_codegen/src/library/codegen/ir/mir/ident.rs +++ b/frb_codegen/src/library/codegen/ir/mir/ident.rs @@ -66,8 +66,8 @@ fn convert_rust_to_c_style(raw: &str) -> String { fn convert_rust_to_dart_style(raw: &str) -> String { let ans = strip_prefix_rhash(raw).to_case(Case::Camel); - let ans = dart_keywords::escape(ans); - ans + + dart_keywords::escape(ans) } fn strip_prefix_rhash(raw: &str) -> &str { diff --git a/frb_example/dart_minimal/lib/src/rust/api/minimal.dart b/frb_example/dart_minimal/lib/src/rust/api/minimal.dart index 89db7c1fa9..5a3ada18f9 100644 --- a/frb_example/dart_minimal/lib/src/rust/api/minimal.dart +++ b/frb_example/dart_minimal/lib/src/rust/api/minimal.dart @@ -8,54 +8,3 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; Future minimalAdder({required int a, required int b}) => RustLib.instance.api.crateApiMinimalMinimalAdder(a: a, b: b); - -Future funcForStructWithFieldRenameTwinNormal( - {required StructWithFieldRenameTwinNormal arg}) => - RustLib.instance.api - .crateApiMinimalFuncForStructWithFieldRenameTwinNormal(arg: arg); - -Future - funcForStructWithDartKeywordFieldTwinNormal( - {required StructWithDartKeywordFieldTwinNormal arg}) => - RustLib.instance.api - .crateApiMinimalFuncForStructWithDartKeywordFieldTwinNormal( - arg: arg); - -class StructWithDartKeywordFieldTwinNormal { - final int class_; - final PlatformInt64 interface_; - - const StructWithDartKeywordFieldTwinNormal({ - required this.class_, - required this.interface_, - }); - - @override - int get hashCode => class_.hashCode ^ interface_.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is StructWithDartKeywordFieldTwinNormal && - runtimeType == other.runtimeType && - class_ == other.class_ && - interface_ == other.interface_; -} - -class StructWithFieldRenameTwinNormal { - final int renamed_field; - - const StructWithFieldRenameTwinNormal({ - required this.renamed_field, - }); - - @override - int get hashCode => renamed_field.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is StructWithFieldRenameTwinNormal && - runtimeType == other.runtimeType && - renamed_field == other.renamed_field; -} diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.dart index 9b35a35d0c..ae3e06b17a 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.dart @@ -57,7 +57,7 @@ class RustLib extends BaseEntrypoint { String get codegenVersion => '2.0.0-dev.38'; @override - int get rustContentHash => 1132682991; + int get rustContentHash => -2119384465; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -68,14 +68,6 @@ class RustLib extends BaseEntrypoint { } abstract class RustLibApi extends BaseApi { - Future - crateApiMinimalFuncForStructWithDartKeywordFieldTwinNormal( - {required StructWithDartKeywordFieldTwinNormal arg}); - - Future - crateApiMinimalFuncForStructWithFieldRenameTwinNormal( - {required StructWithFieldRenameTwinNormal arg}); - Future crateApiMinimalInitApp(); Future crateApiMinimalMinimalAdder({required int a, required int b}); @@ -89,74 +81,13 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { required super.portManager, }); - @override - Future - crateApiMinimalFuncForStructWithDartKeywordFieldTwinNormal( - {required StructWithDartKeywordFieldTwinNormal arg}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - arg, serializer); - pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1, port: port_); - }, - codec: SseCodec( - decodeSuccessData: - sse_decode_struct_with_dart_keyword_field_twin_normal, - decodeErrorData: null, - ), - constMeta: - kCrateApiMinimalFuncForStructWithDartKeywordFieldTwinNormalConstMeta, - argValues: [arg], - apiImpl: this, - )); - } - - TaskConstMeta - get kCrateApiMinimalFuncForStructWithDartKeywordFieldTwinNormalConstMeta => - const TaskConstMeta( - debugName: "func_for_struct_with_dart_keyword_field_twin_normal", - argNames: ["arg"], - ); - - @override - Future - crateApiMinimalFuncForStructWithFieldRenameTwinNormal( - {required StructWithFieldRenameTwinNormal arg}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_box_autoadd_struct_with_field_rename_twin_normal( - arg, serializer); - pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 2, port: port_); - }, - codec: SseCodec( - decodeSuccessData: sse_decode_struct_with_field_rename_twin_normal, - decodeErrorData: null, - ), - constMeta: - kCrateApiMinimalFuncForStructWithFieldRenameTwinNormalConstMeta, - argValues: [arg], - apiImpl: this, - )); - } - - TaskConstMeta - get kCrateApiMinimalFuncForStructWithFieldRenameTwinNormalConstMeta => - const TaskConstMeta( - debugName: "func_for_struct_with_field_rename_twin_normal", - argNames: ["arg"], - ); - @override Future crateApiMinimalInitApp() { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 3, port: port_); + funcId: 1, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -181,7 +112,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(a, serializer); sse_encode_i_32(b, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 4, port: port_); + funcId: 2, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_i_32, @@ -199,113 +130,24 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["a", "b"], ); - @protected - StructWithDartKeywordFieldTwinNormal - dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_struct_with_dart_keyword_field_twin_normal(raw); - } - - @protected - StructWithFieldRenameTwinNormal - dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_struct_with_field_rename_twin_normal(raw); - } - @protected int dco_decode_i_32(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return raw as int; } - @protected - PlatformInt64 dco_decode_i_64(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeI64(raw); - } - - @protected - StructWithDartKeywordFieldTwinNormal - dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return StructWithDartKeywordFieldTwinNormal( - class_: dco_decode_i_32(arr[0]), - interface_: dco_decode_i_64(arr[1]), - ); - } - - @protected - StructWithFieldRenameTwinNormal - dco_decode_struct_with_field_rename_twin_normal(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 StructWithFieldRenameTwinNormal( - renamed_field: dco_decode_i_32(arr[0]), - ); - } - @protected void dco_decode_unit(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return; } - @protected - StructWithDartKeywordFieldTwinNormal - sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_struct_with_dart_keyword_field_twin_normal( - deserializer)); - } - - @protected - StructWithFieldRenameTwinNormal - sse_decode_box_autoadd_struct_with_field_rename_twin_normal( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_struct_with_field_rename_twin_normal(deserializer)); - } - @protected int sse_decode_i_32(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs return deserializer.buffer.getInt32(); } - @protected - PlatformInt64 sse_decode_i_64(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getPlatformInt64(); - } - - @protected - StructWithDartKeywordFieldTwinNormal - sse_decode_struct_with_dart_keyword_field_twin_normal( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_class_ = sse_decode_i_32(deserializer); - var var_interface_ = sse_decode_i_64(deserializer); - return StructWithDartKeywordFieldTwinNormal( - class_: var_class_, interface_: var_interface_); - } - - @protected - StructWithFieldRenameTwinNormal - sse_decode_struct_with_field_rename_twin_normal( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_renamed_field = sse_decode_i_32(deserializer); - return StructWithFieldRenameTwinNormal(renamed_field: var_renamed_field); - } - @protected void sse_decode_unit(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -317,47 +159,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return deserializer.buffer.getUint8() != 0; } - @protected - void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_struct_with_dart_keyword_field_twin_normal(self, serializer); - } - - @protected - void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( - StructWithFieldRenameTwinNormal self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_struct_with_field_rename_twin_normal(self, serializer); - } - @protected void sse_encode_i_32(int self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs serializer.buffer.putInt32(self); } - @protected - void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putPlatformInt64(self); - } - - @protected - void sse_encode_struct_with_dart_keyword_field_twin_normal( - StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.class_, serializer); - sse_encode_i_64(self.interface_, serializer); - } - - @protected - void sse_encode_struct_with_field_rename_twin_normal( - StructWithFieldRenameTwinNormal self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.renamed_field, serializer); - } - @protected void sse_encode_unit(void self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart index e71164fce9..72e4d2de80 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.io.dart @@ -18,86 +18,24 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { required super.portManager, }); - @protected - StructWithDartKeywordFieldTwinNormal - dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - dynamic raw); - - @protected - StructWithFieldRenameTwinNormal - dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); - @protected int dco_decode_i_32(dynamic raw); - @protected - PlatformInt64 dco_decode_i_64(dynamic raw); - - @protected - StructWithDartKeywordFieldTwinNormal - dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw); - - @protected - StructWithFieldRenameTwinNormal - dco_decode_struct_with_field_rename_twin_normal(dynamic raw); - @protected void dco_decode_unit(dynamic raw); - @protected - StructWithDartKeywordFieldTwinNormal - sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - SseDeserializer deserializer); - - @protected - StructWithFieldRenameTwinNormal - sse_decode_box_autoadd_struct_with_field_rename_twin_normal( - SseDeserializer deserializer); - @protected int sse_decode_i_32(SseDeserializer deserializer); - @protected - PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); - - @protected - StructWithDartKeywordFieldTwinNormal - sse_decode_struct_with_dart_keyword_field_twin_normal( - SseDeserializer deserializer); - - @protected - StructWithFieldRenameTwinNormal - sse_decode_struct_with_field_rename_twin_normal( - SseDeserializer deserializer); - @protected void sse_decode_unit(SseDeserializer deserializer); @protected bool sse_decode_bool(SseDeserializer deserializer); - @protected - void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( - StructWithFieldRenameTwinNormal self, SseSerializer serializer); - @protected void sse_encode_i_32(int self, SseSerializer serializer); - @protected - void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer); - - @protected - void sse_encode_struct_with_dart_keyword_field_twin_normal( - StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); - - @protected - void sse_encode_struct_with_field_rename_twin_normal( - StructWithFieldRenameTwinNormal self, SseSerializer serializer); - @protected void sse_encode_unit(void self, SseSerializer serializer); diff --git a/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart b/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart index a227f2a850..69e39a7a08 100644 --- a/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart +++ b/frb_example/dart_minimal/lib/src/rust/frb_generated.web.dart @@ -20,86 +20,24 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { required super.portManager, }); - @protected - StructWithDartKeywordFieldTwinNormal - dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - dynamic raw); - - @protected - StructWithFieldRenameTwinNormal - dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); - @protected int dco_decode_i_32(dynamic raw); - @protected - PlatformInt64 dco_decode_i_64(dynamic raw); - - @protected - StructWithDartKeywordFieldTwinNormal - dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw); - - @protected - StructWithFieldRenameTwinNormal - dco_decode_struct_with_field_rename_twin_normal(dynamic raw); - @protected void dco_decode_unit(dynamic raw); - @protected - StructWithDartKeywordFieldTwinNormal - sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - SseDeserializer deserializer); - - @protected - StructWithFieldRenameTwinNormal - sse_decode_box_autoadd_struct_with_field_rename_twin_normal( - SseDeserializer deserializer); - @protected int sse_decode_i_32(SseDeserializer deserializer); - @protected - PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); - - @protected - StructWithDartKeywordFieldTwinNormal - sse_decode_struct_with_dart_keyword_field_twin_normal( - SseDeserializer deserializer); - - @protected - StructWithFieldRenameTwinNormal - sse_decode_struct_with_field_rename_twin_normal( - SseDeserializer deserializer); - @protected void sse_decode_unit(SseDeserializer deserializer); @protected bool sse_decode_bool(SseDeserializer deserializer); - @protected - void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( - StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( - StructWithFieldRenameTwinNormal self, SseSerializer serializer); - @protected void sse_encode_i_32(int self, SseSerializer serializer); - @protected - void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer); - - @protected - void sse_encode_struct_with_dart_keyword_field_twin_normal( - StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); - - @protected - void sse_encode_struct_with_field_rename_twin_normal( - StructWithFieldRenameTwinNormal self, SseSerializer serializer); - @protected void sse_encode_unit(void self, SseSerializer serializer); diff --git a/frb_example/dart_minimal/rust/src/frb_generated.rs b/frb_example/dart_minimal/rust/src/frb_generated.rs index d3350ab59c..361f76bac8 100644 --- a/frb_example/dart_minimal/rust/src/frb_generated.rs +++ b/frb_example/dart_minimal/rust/src/frb_generated.rs @@ -33,7 +33,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_auto_opaque = RustAutoOpaqueMoi, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.38"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1132682991; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -2119384465; // Section: executor @@ -41,80 +41,6 @@ flutter_rust_bridge::frb_generated_default_handler!(); // Section: wire_funcs -fn wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "func_for_struct_with_dart_keyword_field_twin_normal", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let message = unsafe { - flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( - ptr_, - rust_vec_len_, - data_len_, - ) - }; - let mut deserializer = - flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_arg = ::sse_decode( - &mut deserializer, - ); - deserializer.end(); - move |context| { - transform_result_sse((move || { - Result::<_, ()>::Ok( - crate::api::minimal::func_for_struct_with_dart_keyword_field_twin_normal( - api_arg, - ), - ) - })()) - } - }, - ) -} -fn wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "func_for_struct_with_field_rename_twin_normal", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let message = unsafe { - flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( - ptr_, - rust_vec_len_, - data_len_, - ) - }; - let mut deserializer = - flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_arg = ::sse_decode( - &mut deserializer, - ); - deserializer.end(); - move |context| { - transform_result_sse((move || { - Result::<_, ()>::Ok( - crate::api::minimal::func_for_struct_with_field_rename_twin_normal(api_arg), - ) - })()) - } - }, - ) -} fn wire__crate__api__minimal__init_app_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, @@ -191,35 +117,6 @@ impl SseDecode for i32 { } } -impl SseDecode for i64 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - deserializer.cursor.read_i64::().unwrap() - } -} - -impl SseDecode for crate::api::minimal::StructWithDartKeywordFieldTwinNormal { - // 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_class_ = ::sse_decode(deserializer); - let mut var_interface_ = ::sse_decode(deserializer); - return crate::api::minimal::StructWithDartKeywordFieldTwinNormal { - class: var_class_, - interface: var_interface_, - }; - } -} - -impl SseDecode for crate::api::minimal::StructWithFieldRenameTwinNormal { - // 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_renamed_field = ::sse_decode(deserializer); - return crate::api::minimal::StructWithFieldRenameTwinNormal { - class: var_renamed_field, - }; - } -} - impl SseDecode for () { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {} @@ -241,20 +138,8 @@ fn pde_ffi_dispatcher_primary_impl( ) { // Codec=Pde (Serialization + dispatch), see doc to use other codecs match func_id { - 1 => wire__crate__api__minimal__func_for_struct_with_dart_keyword_field_twin_normal_impl( - port, - ptr, - rust_vec_len, - data_len, - ), - 2 => wire__crate__api__minimal__func_for_struct_with_field_rename_twin_normal_impl( - port, - ptr, - rust_vec_len, - data_len, - ), - 3 => wire__crate__api__minimal__init_app_impl(port, ptr, rust_vec_len, data_len), - 4 => wire__crate__api__minimal__minimal_adder_impl(port, ptr, rust_vec_len, data_len), + 1 => wire__crate__api__minimal__init_app_impl(port, ptr, rust_vec_len, data_len), + 2 => wire__crate__api__minimal__minimal_adder_impl(port, ptr, rust_vec_len, data_len), _ => unreachable!(), } } @@ -273,45 +158,6 @@ fn pde_ffi_dispatcher_sync_impl( // Section: rust2dart -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::minimal::StructWithDartKeywordFieldTwinNormal { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.class.into_into_dart().into_dart(), - self.interface.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::minimal::StructWithDartKeywordFieldTwinNormal -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::minimal::StructWithDartKeywordFieldTwinNormal -{ - fn into_into_dart(self) -> crate::api::minimal::StructWithDartKeywordFieldTwinNormal { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::minimal::StructWithFieldRenameTwinNormal { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.class.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::minimal::StructWithFieldRenameTwinNormal -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::minimal::StructWithFieldRenameTwinNormal -{ - fn into_into_dart(self) -> crate::api::minimal::StructWithFieldRenameTwinNormal { - self - } -} - impl SseEncode for i32 { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -319,28 +165,6 @@ impl SseEncode for i32 { } } -impl SseEncode for i64 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - serializer.cursor.write_i64::(self).unwrap(); - } -} - -impl SseEncode for crate::api::minimal::StructWithDartKeywordFieldTwinNormal { - // 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.class, serializer); - ::sse_encode(self.interface, serializer); - } -} - -impl SseEncode for crate::api::minimal::StructWithFieldRenameTwinNormal { - // 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.class, serializer); - } -} - impl SseEncode for () { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {} diff --git a/frb_example/integrate_third_party/lib/src/rust/third_party/web_audio_api/context.dart b/frb_example/integrate_third_party/lib/src/rust/third_party/web_audio_api/context.dart index 6b665b2d64..36dd5fbb27 100644 --- a/frb_example/integrate_third_party/lib/src/rust/third_party/web_audio_api/context.dart +++ b/frb_example/integrate_third_party/lib/src/rust/third_party/web_audio_api/context.dart @@ -816,7 +816,7 @@ class AudioContextOptions { /// Currently, only the default value is available enum AudioContextRenderSizeCategory { /// The default value of 128 frames - Default, + default_, ; } diff --git a/frb_example/pure_dart/frb_generated.h b/frb_example/pure_dart/frb_generated.h index 5b482a7c33..f2a1de09c3 100644 --- a/frb_example/pure_dart/frb_generated.h +++ b/frb_example/pure_dart/frb_generated.h @@ -2343,6 +2343,15 @@ typedef struct wire_cst_list_StreamSink_i_32_Dco { int32_t len; } wire_cst_list_StreamSink_i_32_Dco; +typedef struct wire_cst_struct_with_dart_keyword_field_twin_rust_async { + int32_t class_; + int64_t interface; +} wire_cst_struct_with_dart_keyword_field_twin_rust_async; + +typedef struct wire_cst_struct_with_field_rename_twin_rust_async { + int32_t class_; +} wire_cst_struct_with_field_rename_twin_rust_async; + typedef struct wire_cst_struct_with_one_field_twin_rust_async { int32_t a; } wire_cst_struct_with_one_field_twin_rust_async; @@ -2365,6 +2374,15 @@ typedef struct wire_cst_tuple_struct_with_two_field_twin_rust_async { int32_t field1; } wire_cst_tuple_struct_with_two_field_twin_rust_async; +typedef struct wire_cst_struct_with_dart_keyword_field_twin_sync { + int32_t class_; + int64_t interface; +} wire_cst_struct_with_dart_keyword_field_twin_sync; + +typedef struct wire_cst_struct_with_field_rename_twin_sync { + int32_t class_; +} wire_cst_struct_with_field_rename_twin_sync; + typedef struct wire_cst_struct_with_one_field_twin_sync { int32_t a; } wire_cst_struct_with_one_field_twin_sync; @@ -2492,6 +2510,15 @@ typedef struct wire_cst_my_struct_containing_stream_sink_twin_normal { struct wire_cst_list_prim_u_8_strict *b; } wire_cst_my_struct_containing_stream_sink_twin_normal; +typedef struct wire_cst_struct_with_dart_keyword_field_twin_normal { + int32_t class_; + int64_t interface; +} wire_cst_struct_with_dart_keyword_field_twin_normal; + +typedef struct wire_cst_struct_with_field_rename_twin_normal { + int32_t class_; +} wire_cst_struct_with_field_rename_twin_normal; + typedef struct wire_cst_struct_with_one_field_twin_normal { int32_t a; } wire_cst_struct_with_one_field_twin_normal; @@ -12632,6 +12659,12 @@ void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__stream_twin_s int32_t rust_vec_len_, int32_t data_len_); +void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async(int64_t port_, + struct wire_cst_struct_with_dart_keyword_field_twin_rust_async *arg); + +void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async(int64_t port_, + struct wire_cst_struct_with_field_rename_twin_rust_async *arg); + void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_one_field_twin_rust_async(int64_t port_, struct wire_cst_struct_with_one_field_twin_rust_async *arg); @@ -12647,6 +12680,16 @@ void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twi void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct_with_two_field_twin_rust_async(int64_t port_, struct wire_cst_tuple_struct_with_two_field_twin_rust_async *arg); +void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse(int64_t port_, + uint8_t *ptr_, + int32_t rust_vec_len_, + int32_t data_len_); + +void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse(int64_t port_, + uint8_t *ptr_, + int32_t rust_vec_len_, + int32_t data_len_); + void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_struct_with_one_field_twin_rust_async_sse(int64_t port_, uint8_t *ptr_, int32_t rust_vec_len_, @@ -12672,6 +12715,16 @@ void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twi int32_t rust_vec_len_, int32_t data_len_); +void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse(int64_t port_, + uint8_t *ptr_, + int32_t rust_vec_len_, + int32_t data_len_); + +void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse(int64_t port_, + uint8_t *ptr_, + int32_t rust_vec_len_, + int32_t data_len_); + void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_struct_with_one_field_twin_sse(int64_t port_, uint8_t *ptr_, int32_t rust_vec_len_, @@ -12697,6 +12750,10 @@ void frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twi int32_t rust_vec_len_, int32_t data_len_); +WireSyncRust2DartDco frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync(struct wire_cst_struct_with_dart_keyword_field_twin_sync *arg); + +WireSyncRust2DartDco frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync(struct wire_cst_struct_with_field_rename_twin_sync *arg); + WireSyncRust2DartDco frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_one_field_twin_sync(struct wire_cst_struct_with_one_field_twin_sync *arg); WireSyncRust2DartDco frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_two_field_twin_sync(struct wire_cst_struct_with_two_field_twin_sync *arg); @@ -12707,6 +12764,14 @@ WireSyncRust2DartDco frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manua WireSyncRust2DartDco frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_two_field_twin_sync(struct wire_cst_tuple_struct_with_two_field_twin_sync *arg); +WireSyncRust2DartSse frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse(uint8_t *ptr_, + int32_t rust_vec_len_, + int32_t data_len_); + +WireSyncRust2DartSse frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse(uint8_t *ptr_, + int32_t rust_vec_len_, + int32_t data_len_); + WireSyncRust2DartSse frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_struct_with_one_field_twin_sync_sse(uint8_t *ptr_, int32_t rust_vec_len_, int32_t data_len_); @@ -13114,6 +13179,12 @@ void frbgen_frb_example_pure_dart_wire__crate__api__stream_misc__func_stream_rea void frbgen_frb_example_pure_dart_wire__crate__api__stream_misc__stream_sink_dart_async_twin_normal(int64_t port_, struct wire_cst_list_prim_u_8_strict *sink); +void frbgen_frb_example_pure_dart_wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal(int64_t port_, + struct wire_cst_struct_with_dart_keyword_field_twin_normal *arg); + +void frbgen_frb_example_pure_dart_wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal(int64_t port_, + struct wire_cst_struct_with_field_rename_twin_normal *arg); + void frbgen_frb_example_pure_dart_wire__crate__api__structure__func_struct_with_one_field_twin_normal(int64_t port_, struct wire_cst_struct_with_one_field_twin_normal *arg); @@ -14351,6 +14422,12 @@ struct wire_cst_struct_with_comments_twin_sync *frbgen_frb_example_pure_dart_cst struct wire_cst_struct_with_custom_name_method_twin_normal *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_custom_name_method_twin_normal(void); +struct wire_cst_struct_with_dart_keyword_field_twin_normal *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal(void); + +struct wire_cst_struct_with_dart_keyword_field_twin_rust_async *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_rust_async(void); + +struct wire_cst_struct_with_dart_keyword_field_twin_sync *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_sync(void); + struct wire_cst_struct_with_enum_twin_normal *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_enum_twin_normal(void); struct wire_cst_struct_with_enum_twin_rust_async *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_enum_twin_rust_async(void); @@ -14369,6 +14446,12 @@ struct wire_cst_struct_with_explicit_auto_opaque_field_twin_sync *frbgen_frb_exa struct wire_cst_struct_with_explicit_auto_opaque_field_twin_sync_moi *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync_moi(void); +struct wire_cst_struct_with_field_rename_twin_normal *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_normal(void); + +struct wire_cst_struct_with_field_rename_twin_rust_async *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_rust_async(void); + +struct wire_cst_struct_with_field_rename_twin_sync *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_sync(void); + struct wire_cst_struct_with_good_and_opaque_field_twin_moi *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_good_and_opaque_field_twin_moi(void); struct wire_cst_struct_with_good_and_opaque_field_twin_normal *frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_good_and_opaque_field_twin_normal(void); @@ -14975,6 +15058,9 @@ 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_comments_twin_rust_async); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_comments_twin_sync); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_custom_name_method_twin_normal); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_rust_async); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_sync); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_enum_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_enum_twin_rust_async); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_enum_twin_sync); @@ -14984,6 +15070,9 @@ 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_explicit_auto_opaque_field_twin_rust_async_moi); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync_moi); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_normal); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_rust_async); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_sync); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_good_and_opaque_field_twin_moi); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_good_and_opaque_field_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_good_and_opaque_field_twin_rust_async); @@ -18129,26 +18218,36 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__stream_twin_sse__stream_sink_fixed_sized_primitive_array_twin_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__stream_twin_sse__stream_sink_inside_struct_twin_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__stream_twin_sse__stream_sink_inside_vec_twin_sse); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_one_field_twin_rust_async); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_two_field_twin_rust_async); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_zero_field_twin_rust_async); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct_with_one_field_twin_rust_async); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct_with_two_field_twin_rust_async); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_struct_with_one_field_twin_rust_async_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_struct_with_two_field_twin_rust_async_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_struct_with_zero_field_twin_rust_async_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_tuple_struct_with_one_field_twin_rust_async_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_tuple_struct_with_two_field_twin_rust_async_sse); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_struct_with_one_field_twin_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_struct_with_two_field_twin_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_struct_with_zero_field_twin_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_tuple_struct_with_one_field_twin_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_tuple_struct_with_two_field_twin_sse); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_one_field_twin_sync); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_two_field_twin_sync); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_zero_field_twin_sync); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_one_field_twin_sync); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_two_field_twin_sync); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_struct_with_one_field_twin_sync_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_struct_with_two_field_twin_sync_sse); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_struct_with_zero_field_twin_sync_sse); @@ -18274,6 +18373,8 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__stream__stream_sink_inside_vec_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__stream_misc__func_stream_realistic_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__stream_misc__stream_sink_dart_async_twin_normal); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__structure__func_struct_with_one_field_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__structure__func_struct_with_two_field_twin_normal); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire__crate__api__structure__func_struct_with_zero_field_twin_normal); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async.dart index dc10bfb660..c12bed0826 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async.dart @@ -17,19 +17,19 @@ Future class MoreThanJustOneRawStringStructTwinRustAsync { final String regular; final String type; - final bool async; + final bool async_; final String another; const MoreThanJustOneRawStringStructTwinRustAsync({ required this.regular, required this.type, - required this.async, + required this.async_, required this.another, }); @override int get hashCode => - regular.hashCode ^ type.hashCode ^ async.hashCode ^ another.hashCode; + regular.hashCode ^ type.hashCode ^ async_.hashCode ^ another.hashCode; @override bool operator ==(Object other) => @@ -38,7 +38,7 @@ class MoreThanJustOneRawStringStructTwinRustAsync { runtimeType == other.runtimeType && regular == other.regular && type == other.type && - async == other.async && + async_ == other.async_ && another == other.another; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async_sse.dart index 4c8c4742c0..0f9e944111 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async_sse.dart @@ -17,19 +17,19 @@ Future class MoreThanJustOneRawStringStructTwinRustAsyncSse { final String regular; final String type; - final bool async; + final bool async_; final String another; const MoreThanJustOneRawStringStructTwinRustAsyncSse({ required this.regular, required this.type, - required this.async, + required this.async_, required this.another, }); @override int get hashCode => - regular.hashCode ^ type.hashCode ^ async.hashCode ^ another.hashCode; + regular.hashCode ^ type.hashCode ^ async_.hashCode ^ another.hashCode; @override bool operator ==(Object other) => @@ -38,7 +38,7 @@ class MoreThanJustOneRawStringStructTwinRustAsyncSse { runtimeType == other.runtimeType && regular == other.regular && type == other.type && - async == other.async && + async_ == other.async_ && another == other.another; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sse.dart index 7b51142ec8..81df216498 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sse.dart @@ -17,19 +17,19 @@ Future class MoreThanJustOneRawStringStructTwinSse { final String regular; final String type; - final bool async; + final bool async_; final String another; const MoreThanJustOneRawStringStructTwinSse({ required this.regular, required this.type, - required this.async, + required this.async_, required this.another, }); @override int get hashCode => - regular.hashCode ^ type.hashCode ^ async.hashCode ^ another.hashCode; + regular.hashCode ^ type.hashCode ^ async_.hashCode ^ another.hashCode; @override bool operator ==(Object other) => @@ -38,7 +38,7 @@ class MoreThanJustOneRawStringStructTwinSse { runtimeType == other.runtimeType && regular == other.regular && type == other.type && - async == other.async && + async_ == other.async_ && another == other.another; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sync.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sync.dart index bbc0a804f6..cf424756b3 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sync.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sync.dart @@ -17,19 +17,19 @@ MoreThanJustOneRawStringStructTwinSync class MoreThanJustOneRawStringStructTwinSync { final String regular; final String type; - final bool async; + final bool async_; final String another; const MoreThanJustOneRawStringStructTwinSync({ required this.regular, required this.type, - required this.async, + required this.async_, required this.another, }); @override int get hashCode => - regular.hashCode ^ type.hashCode ^ async.hashCode ^ another.hashCode; + regular.hashCode ^ type.hashCode ^ async_.hashCode ^ another.hashCode; @override bool operator ==(Object other) => @@ -38,7 +38,7 @@ class MoreThanJustOneRawStringStructTwinSync { runtimeType == other.runtimeType && regular == other.regular && type == other.type && - async == other.async && + async_ == other.async_ && another == other.another; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sync_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sync_sse.dart index 8bc3f33bdc..940aa461b7 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sync_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/raw_string_twin_sync_sse.dart @@ -17,19 +17,19 @@ MoreThanJustOneRawStringStructTwinSyncSse class MoreThanJustOneRawStringStructTwinSyncSse { final String regular; final String type; - final bool async; + final bool async_; final String another; const MoreThanJustOneRawStringStructTwinSyncSse({ required this.regular, required this.type, - required this.async, + required this.async_, required this.another, }); @override int get hashCode => - regular.hashCode ^ type.hashCode ^ async.hashCode ^ another.hashCode; + regular.hashCode ^ type.hashCode ^ async_.hashCode ^ another.hashCode; @override bool operator ==(Object other) => @@ -38,7 +38,7 @@ class MoreThanJustOneRawStringStructTwinSyncSse { runtimeType == other.runtimeType && regular == other.regular && type == other.type && - async == other.async && + async_ == other.async_ && another == other.another; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_rust_async.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_rust_async.dart index acf711226b..3e61eb324d 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_rust_async.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_rust_async.dart @@ -38,6 +38,59 @@ Future< .crateApiPseudoManualStructureTwinRustAsyncFuncTupleStructWithTwoFieldTwinRustAsync( arg: arg); +Future< + StructWithFieldRenameTwinRustAsync> funcForStructWithFieldRenameTwinRustAsync( + {required StructWithFieldRenameTwinRustAsync arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithFieldRenameTwinRustAsync( + arg: arg); + +Future + funcForStructWithDartKeywordFieldTwinRustAsync( + {required StructWithDartKeywordFieldTwinRustAsync arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithDartKeywordFieldTwinRustAsync( + arg: arg); + +class StructWithDartKeywordFieldTwinRustAsync { + final int class_; + final PlatformInt64 interface_; + + const StructWithDartKeywordFieldTwinRustAsync({ + required this.class_, + required this.interface_, + }); + + @override + int get hashCode => class_.hashCode ^ interface_.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithDartKeywordFieldTwinRustAsync && + runtimeType == other.runtimeType && + class_ == other.class_ && + interface_ == other.interface_; +} + +class StructWithFieldRenameTwinRustAsync { + final int renamed_field; + + const StructWithFieldRenameTwinRustAsync({ + required this.renamed_field, + }); + + @override + int get hashCode => renamed_field.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithFieldRenameTwinRustAsync && + runtimeType == other.runtimeType && + renamed_field == other.renamed_field; +} + class StructWithOneFieldTwinRustAsync { final int a; diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_rust_async_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_rust_async_sse.dart index 3b001e1bbe..6d2c0805e0 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_rust_async_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_rust_async_sse.dart @@ -41,6 +41,59 @@ Future .crateApiPseudoManualStructureTwinRustAsyncSseFuncTupleStructWithTwoFieldTwinRustAsyncSse( arg: arg); +Future + funcForStructWithFieldRenameTwinRustAsyncSse( + {required StructWithFieldRenameTwinRustAsyncSse arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinRustAsyncSseFuncForStructWithFieldRenameTwinRustAsyncSse( + arg: arg); + +Future + funcForStructWithDartKeywordFieldTwinRustAsyncSse( + {required StructWithDartKeywordFieldTwinRustAsyncSse arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinRustAsyncSseFuncForStructWithDartKeywordFieldTwinRustAsyncSse( + arg: arg); + +class StructWithDartKeywordFieldTwinRustAsyncSse { + final int class_; + final PlatformInt64 interface_; + + const StructWithDartKeywordFieldTwinRustAsyncSse({ + required this.class_, + required this.interface_, + }); + + @override + int get hashCode => class_.hashCode ^ interface_.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithDartKeywordFieldTwinRustAsyncSse && + runtimeType == other.runtimeType && + class_ == other.class_ && + interface_ == other.interface_; +} + +class StructWithFieldRenameTwinRustAsyncSse { + final int renamed_field; + + const StructWithFieldRenameTwinRustAsyncSse({ + required this.renamed_field, + }); + + @override + int get hashCode => renamed_field.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithFieldRenameTwinRustAsyncSse && + runtimeType == other.runtimeType && + renamed_field == other.renamed_field; +} + class StructWithOneFieldTwinRustAsyncSse { final int a; diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sse.dart index cd22e84f2f..fef63d3336 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sse.dart @@ -36,6 +36,58 @@ Future funcTupleStructWithTwoFieldTwinSse( .crateApiPseudoManualStructureTwinSseFuncTupleStructWithTwoFieldTwinSse( arg: arg); +Future funcForStructWithFieldRenameTwinSse( + {required StructWithFieldRenameTwinSse arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinSseFuncForStructWithFieldRenameTwinSse( + arg: arg); + +Future< + StructWithDartKeywordFieldTwinSse> funcForStructWithDartKeywordFieldTwinSse( + {required StructWithDartKeywordFieldTwinSse arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinSseFuncForStructWithDartKeywordFieldTwinSse( + arg: arg); + +class StructWithDartKeywordFieldTwinSse { + final int class_; + final PlatformInt64 interface_; + + const StructWithDartKeywordFieldTwinSse({ + required this.class_, + required this.interface_, + }); + + @override + int get hashCode => class_.hashCode ^ interface_.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithDartKeywordFieldTwinSse && + runtimeType == other.runtimeType && + class_ == other.class_ && + interface_ == other.interface_; +} + +class StructWithFieldRenameTwinSse { + final int renamed_field; + + const StructWithFieldRenameTwinSse({ + required this.renamed_field, + }); + + @override + int get hashCode => renamed_field.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithFieldRenameTwinSse && + runtimeType == other.runtimeType && + renamed_field == other.renamed_field; +} + class StructWithOneFieldTwinSse { final int a; diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sync.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sync.dart index 15b4c73266..ab90a6c7fc 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sync.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sync.dart @@ -36,6 +36,57 @@ TupleStructWithTwoFieldTwinSync funcTupleStructWithTwoFieldTwinSync( .crateApiPseudoManualStructureTwinSyncFuncTupleStructWithTwoFieldTwinSync( arg: arg); +StructWithFieldRenameTwinSync funcForStructWithFieldRenameTwinSync( + {required StructWithFieldRenameTwinSync arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinSyncFuncForStructWithFieldRenameTwinSync( + arg: arg); + +StructWithDartKeywordFieldTwinSync funcForStructWithDartKeywordFieldTwinSync( + {required StructWithDartKeywordFieldTwinSync arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinSyncFuncForStructWithDartKeywordFieldTwinSync( + arg: arg); + +class StructWithDartKeywordFieldTwinSync { + final int class_; + final PlatformInt64 interface_; + + const StructWithDartKeywordFieldTwinSync({ + required this.class_, + required this.interface_, + }); + + @override + int get hashCode => class_.hashCode ^ interface_.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithDartKeywordFieldTwinSync && + runtimeType == other.runtimeType && + class_ == other.class_ && + interface_ == other.interface_; +} + +class StructWithFieldRenameTwinSync { + final int renamed_field; + + const StructWithFieldRenameTwinSync({ + required this.renamed_field, + }); + + @override + int get hashCode => renamed_field.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithFieldRenameTwinSync && + runtimeType == other.runtimeType && + renamed_field == other.renamed_field; +} + class StructWithOneFieldTwinSync { final int a; diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sync_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sync_sse.dart index b3e282c7e3..73c5308271 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sync_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/structure_twin_sync_sse.dart @@ -36,6 +36,57 @@ TupleStructWithTwoFieldTwinSyncSse funcTupleStructWithTwoFieldTwinSyncSse( .crateApiPseudoManualStructureTwinSyncSseFuncTupleStructWithTwoFieldTwinSyncSse( arg: arg); +StructWithFieldRenameTwinSyncSse funcForStructWithFieldRenameTwinSyncSse( + {required StructWithFieldRenameTwinSyncSse arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinSyncSseFuncForStructWithFieldRenameTwinSyncSse( + arg: arg); + +StructWithDartKeywordFieldTwinSyncSse funcForStructWithDartKeywordFieldTwinSyncSse( + {required StructWithDartKeywordFieldTwinSyncSse arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinSyncSseFuncForStructWithDartKeywordFieldTwinSyncSse( + arg: arg); + +class StructWithDartKeywordFieldTwinSyncSse { + final int class_; + final PlatformInt64 interface_; + + const StructWithDartKeywordFieldTwinSyncSse({ + required this.class_, + required this.interface_, + }); + + @override + int get hashCode => class_.hashCode ^ interface_.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithDartKeywordFieldTwinSyncSse && + runtimeType == other.runtimeType && + class_ == other.class_ && + interface_ == other.interface_; +} + +class StructWithFieldRenameTwinSyncSse { + final int renamed_field; + + const StructWithFieldRenameTwinSyncSse({ + required this.renamed_field, + }); + + @override + int get hashCode => renamed_field.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithFieldRenameTwinSyncSse && + runtimeType == other.runtimeType && + renamed_field == other.renamed_field; +} + class StructWithOneFieldTwinSyncSse { final int a; diff --git a/frb_example/pure_dart/lib/src/rust/api/raw_string.dart b/frb_example/pure_dart/lib/src/rust/api/raw_string.dart index 35fe807e52..efafd4bfb6 100644 --- a/frb_example/pure_dart/lib/src/rust/api/raw_string.dart +++ b/frb_example/pure_dart/lib/src/rust/api/raw_string.dart @@ -16,19 +16,19 @@ Future class MoreThanJustOneRawStringStructTwinNormal { final String regular; final String type; - final bool async; + final bool async_; final String another; const MoreThanJustOneRawStringStructTwinNormal({ required this.regular, required this.type, - required this.async, + required this.async_, required this.another, }); @override int get hashCode => - regular.hashCode ^ type.hashCode ^ async.hashCode ^ another.hashCode; + regular.hashCode ^ type.hashCode ^ async_.hashCode ^ another.hashCode; @override bool operator ==(Object other) => @@ -37,7 +37,7 @@ class MoreThanJustOneRawStringStructTwinNormal { runtimeType == other.runtimeType && regular == other.regular && type == other.type && - async == other.async && + async_ == other.async_ && another == other.another; } diff --git a/frb_example/pure_dart/lib/src/rust/api/structure.dart b/frb_example/pure_dart/lib/src/rust/api/structure.dart index 0803ab4251..b025b9a653 100644 --- a/frb_example/pure_dart/lib/src/rust/api/structure.dart +++ b/frb_example/pure_dart/lib/src/rust/api/structure.dart @@ -31,6 +31,57 @@ Future funcTupleStructWithTwoFieldTwinNormal( RustLib.instance.api .crateApiStructureFuncTupleStructWithTwoFieldTwinNormal(arg: arg); +Future funcForStructWithFieldRenameTwinNormal( + {required StructWithFieldRenameTwinNormal arg}) => + RustLib.instance.api + .crateApiStructureFuncForStructWithFieldRenameTwinNormal(arg: arg); + +Future + funcForStructWithDartKeywordFieldTwinNormal( + {required StructWithDartKeywordFieldTwinNormal arg}) => + RustLib.instance.api + .crateApiStructureFuncForStructWithDartKeywordFieldTwinNormal( + arg: arg); + +class StructWithDartKeywordFieldTwinNormal { + final int class_; + final PlatformInt64 interface_; + + const StructWithDartKeywordFieldTwinNormal({ + required this.class_, + required this.interface_, + }); + + @override + int get hashCode => class_.hashCode ^ interface_.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithDartKeywordFieldTwinNormal && + runtimeType == other.runtimeType && + class_ == other.class_ && + interface_ == other.interface_; +} + +class StructWithFieldRenameTwinNormal { + final int renamed_field; + + const StructWithFieldRenameTwinNormal({ + required this.renamed_field, + }); + + @override + int get hashCode => renamed_field.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithFieldRenameTwinNormal && + runtimeType == other.runtimeType && + renamed_field == other.renamed_field; +} + class StructWithOneFieldTwinNormal { final int a; 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 aaa36f603a..2610dda2fd 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 @@ -7,8 +7,8 @@ import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; enum MyEnum { - False, - True, + 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 68ee17a81e..e746cfb49d 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.dart @@ -324,7 +324,7 @@ class RustLib extends BaseEntrypoint { String get codegenVersion => '2.0.0-dev.38'; @override - int get rustContentHash => 116563282; + int get rustContentHash => -2031266698; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -9423,6 +9423,14 @@ abstract class RustLibApi extends BaseApi { Future crateApiPseudoManualStreamTwinSseStreamSinkInsideVecTwinSse( {required List> arg}); + Future + crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithDartKeywordFieldTwinRustAsync( + {required StructWithDartKeywordFieldTwinRustAsync arg}); + + Future + crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithFieldRenameTwinRustAsync( + {required StructWithFieldRenameTwinRustAsync arg}); + Future crateApiPseudoManualStructureTwinRustAsyncFuncStructWithOneFieldTwinRustAsync( {required StructWithOneFieldTwinRustAsync arg}); @@ -9443,6 +9451,14 @@ abstract class RustLibApi extends BaseApi { crateApiPseudoManualStructureTwinRustAsyncFuncTupleStructWithTwoFieldTwinRustAsync( {required TupleStructWithTwoFieldTwinRustAsync arg}); + Future + crateApiPseudoManualStructureTwinRustAsyncSseFuncForStructWithDartKeywordFieldTwinRustAsyncSse( + {required StructWithDartKeywordFieldTwinRustAsyncSse arg}); + + Future + crateApiPseudoManualStructureTwinRustAsyncSseFuncForStructWithFieldRenameTwinRustAsyncSse( + {required StructWithFieldRenameTwinRustAsyncSse arg}); + Future crateApiPseudoManualStructureTwinRustAsyncSseFuncStructWithOneFieldTwinRustAsyncSse( {required StructWithOneFieldTwinRustAsyncSse arg}); @@ -9463,6 +9479,14 @@ abstract class RustLibApi extends BaseApi { crateApiPseudoManualStructureTwinRustAsyncSseFuncTupleStructWithTwoFieldTwinRustAsyncSse( {required TupleStructWithTwoFieldTwinRustAsyncSse arg}); + Future + crateApiPseudoManualStructureTwinSseFuncForStructWithDartKeywordFieldTwinSse( + {required StructWithDartKeywordFieldTwinSse arg}); + + Future + crateApiPseudoManualStructureTwinSseFuncForStructWithFieldRenameTwinSse( + {required StructWithFieldRenameTwinSse arg}); + Future crateApiPseudoManualStructureTwinSseFuncStructWithOneFieldTwinSse( {required StructWithOneFieldTwinSse arg}); @@ -9483,6 +9507,14 @@ abstract class RustLibApi extends BaseApi { crateApiPseudoManualStructureTwinSseFuncTupleStructWithTwoFieldTwinSse( {required TupleStructWithTwoFieldTwinSse arg}); + StructWithDartKeywordFieldTwinSync + crateApiPseudoManualStructureTwinSyncFuncForStructWithDartKeywordFieldTwinSync( + {required StructWithDartKeywordFieldTwinSync arg}); + + StructWithFieldRenameTwinSync + crateApiPseudoManualStructureTwinSyncFuncForStructWithFieldRenameTwinSync( + {required StructWithFieldRenameTwinSync arg}); + StructWithOneFieldTwinSync crateApiPseudoManualStructureTwinSyncFuncStructWithOneFieldTwinSync( {required StructWithOneFieldTwinSync arg}); @@ -9503,6 +9535,14 @@ abstract class RustLibApi extends BaseApi { crateApiPseudoManualStructureTwinSyncFuncTupleStructWithTwoFieldTwinSync( {required TupleStructWithTwoFieldTwinSync arg}); + StructWithDartKeywordFieldTwinSyncSse + crateApiPseudoManualStructureTwinSyncSseFuncForStructWithDartKeywordFieldTwinSyncSse( + {required StructWithDartKeywordFieldTwinSyncSse arg}); + + StructWithFieldRenameTwinSyncSse + crateApiPseudoManualStructureTwinSyncSseFuncForStructWithFieldRenameTwinSyncSse( + {required StructWithFieldRenameTwinSyncSse arg}); + StructWithOneFieldTwinSyncSse crateApiPseudoManualStructureTwinSyncSseFuncStructWithOneFieldTwinSyncSse( {required StructWithOneFieldTwinSyncSse arg}); @@ -9919,6 +9959,14 @@ abstract class RustLibApi extends BaseApi { Future> crateApiStreamMiscStreamSinkDartAsyncTwinNormal(); + Future + crateApiStructureFuncForStructWithDartKeywordFieldTwinNormal( + {required StructWithDartKeywordFieldTwinNormal arg}); + + Future + crateApiStructureFuncForStructWithFieldRenameTwinNormal( + {required StructWithFieldRenameTwinNormal arg}); + Future crateApiStructureFuncStructWithOneFieldTwinNormal( {required StructWithOneFieldTwinNormal arg}); @@ -88180,6 +88228,70 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["arg"], ); + @override + Future + crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithDartKeywordFieldTwinRustAsync( + {required StructWithDartKeywordFieldTwinRustAsync arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + arg); + return wire + .wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_struct_with_dart_keyword_field_twin_rust_async, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinRustAsyncFuncForStructWithDartKeywordFieldTwinRustAsyncConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinRustAsyncFuncForStructWithDartKeywordFieldTwinRustAsyncConstMeta => + const TaskConstMeta( + debugName: + "func_for_struct_with_dart_keyword_field_twin_rust_async", + argNames: ["arg"], + ); + + @override + Future + crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithFieldRenameTwinRustAsync( + {required StructWithFieldRenameTwinRustAsync arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_box_autoadd_struct_with_field_rename_twin_rust_async( + arg); + return wire + .wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_struct_with_field_rename_twin_rust_async, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinRustAsyncFuncForStructWithFieldRenameTwinRustAsyncConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinRustAsyncFuncForStructWithFieldRenameTwinRustAsyncConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_field_rename_twin_rust_async", + argNames: ["arg"], + ); + @override Future crateApiPseudoManualStructureTwinRustAsyncFuncStructWithOneFieldTwinRustAsync( @@ -88334,6 +88446,73 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["arg"], ); + @override + Future + crateApiPseudoManualStructureTwinRustAsyncSseFuncForStructWithDartKeywordFieldTwinRustAsyncSse( + {required StructWithDartKeywordFieldTwinRustAsyncSse arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async_sse( + arg, serializer); + final raw_ = serializer.intoRaw(); + return wire + .wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse( + port_, raw_.ptr, raw_.rustVecLen, raw_.dataLen); + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_struct_with_dart_keyword_field_twin_rust_async_sse, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinRustAsyncSseFuncForStructWithDartKeywordFieldTwinRustAsyncSseConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinRustAsyncSseFuncForStructWithDartKeywordFieldTwinRustAsyncSseConstMeta => + const TaskConstMeta( + debugName: + "func_for_struct_with_dart_keyword_field_twin_rust_async_sse", + argNames: ["arg"], + ); + + @override + Future + crateApiPseudoManualStructureTwinRustAsyncSseFuncForStructWithFieldRenameTwinRustAsyncSse( + {required StructWithFieldRenameTwinRustAsyncSse arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_field_rename_twin_rust_async_sse( + arg, serializer); + final raw_ = serializer.intoRaw(); + return wire + .wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse( + port_, raw_.ptr, raw_.rustVecLen, raw_.dataLen); + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_struct_with_field_rename_twin_rust_async_sse, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinRustAsyncSseFuncForStructWithFieldRenameTwinRustAsyncSseConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinRustAsyncSseFuncForStructWithFieldRenameTwinRustAsyncSseConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_field_rename_twin_rust_async_sse", + argNames: ["arg"], + ); + @override Future crateApiPseudoManualStructureTwinRustAsyncSseFuncStructWithOneFieldTwinRustAsyncSse( @@ -88497,6 +88676,70 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["arg"], ); + @override + Future + crateApiPseudoManualStructureTwinSseFuncForStructWithDartKeywordFieldTwinSse( + {required StructWithDartKeywordFieldTwinSse arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sse( + arg, serializer); + final raw_ = serializer.intoRaw(); + return wire + .wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse( + port_, raw_.ptr, raw_.rustVecLen, raw_.dataLen); + }, + codec: SseCodec( + decodeSuccessData: sse_decode_struct_with_dart_keyword_field_twin_sse, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinSseFuncForStructWithDartKeywordFieldTwinSseConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinSseFuncForStructWithDartKeywordFieldTwinSseConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_dart_keyword_field_twin_sse", + argNames: ["arg"], + ); + + @override + Future + crateApiPseudoManualStructureTwinSseFuncForStructWithFieldRenameTwinSse( + {required StructWithFieldRenameTwinSse arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_field_rename_twin_sse( + arg, serializer); + final raw_ = serializer.intoRaw(); + return wire + .wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse( + port_, raw_.ptr, raw_.rustVecLen, raw_.dataLen); + }, + codec: SseCodec( + decodeSuccessData: sse_decode_struct_with_field_rename_twin_sse, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinSseFuncForStructWithFieldRenameTwinSseConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinSseFuncForStructWithFieldRenameTwinSseConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_field_rename_twin_sse", + argNames: ["arg"], + ); + @override Future crateApiPseudoManualStructureTwinSseFuncStructWithOneFieldTwinSse( @@ -88654,6 +88897,67 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["arg"], ); + @override + StructWithDartKeywordFieldTwinSync + crateApiPseudoManualStructureTwinSyncFuncForStructWithDartKeywordFieldTwinSync( + {required StructWithDartKeywordFieldTwinSync arg}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = + cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + arg); + return wire + .wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync( + arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_struct_with_dart_keyword_field_twin_sync, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinSyncFuncForStructWithDartKeywordFieldTwinSyncConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinSyncFuncForStructWithDartKeywordFieldTwinSyncConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_dart_keyword_field_twin_sync", + argNames: ["arg"], + ); + + @override + StructWithFieldRenameTwinSync + crateApiPseudoManualStructureTwinSyncFuncForStructWithFieldRenameTwinSync( + {required StructWithFieldRenameTwinSync arg}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = + cst_encode_box_autoadd_struct_with_field_rename_twin_sync(arg); + return wire + .wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync( + arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_struct_with_field_rename_twin_sync, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinSyncFuncForStructWithFieldRenameTwinSyncConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinSyncFuncForStructWithFieldRenameTwinSyncConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_field_rename_twin_sync", + argNames: ["arg"], + ); + @override StructWithOneFieldTwinSync crateApiPseudoManualStructureTwinSyncFuncStructWithOneFieldTwinSync( @@ -88801,6 +89105,71 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["arg"], ); + @override + StructWithDartKeywordFieldTwinSyncSse + crateApiPseudoManualStructureTwinSyncSseFuncForStructWithDartKeywordFieldTwinSyncSse( + {required StructWithDartKeywordFieldTwinSyncSse arg}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync_sse( + arg, serializer); + final raw_ = serializer.intoRaw(); + return wire + .wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse( + raw_.ptr, raw_.rustVecLen, raw_.dataLen); + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_struct_with_dart_keyword_field_twin_sync_sse, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinSyncSseFuncForStructWithDartKeywordFieldTwinSyncSseConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinSyncSseFuncForStructWithDartKeywordFieldTwinSyncSseConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_dart_keyword_field_twin_sync_sse", + argNames: ["arg"], + ); + + @override + StructWithFieldRenameTwinSyncSse + crateApiPseudoManualStructureTwinSyncSseFuncForStructWithFieldRenameTwinSyncSse( + {required StructWithFieldRenameTwinSyncSse arg}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_field_rename_twin_sync_sse( + arg, serializer); + final raw_ = serializer.intoRaw(); + return wire + .wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse( + raw_.ptr, raw_.rustVecLen, raw_.dataLen); + }, + codec: SseCodec( + decodeSuccessData: sse_decode_struct_with_field_rename_twin_sync_sse, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinSyncSseFuncForStructWithFieldRenameTwinSyncSseConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinSyncSseFuncForStructWithFieldRenameTwinSyncSseConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_field_rename_twin_sync_sse", + argNames: ["arg"], + ); + @override StructWithOneFieldTwinSyncSse crateApiPseudoManualStructureTwinSyncSseFuncStructWithOneFieldTwinSyncSse( @@ -92455,6 +92824,68 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["sink"], ); + @override + Future + crateApiStructureFuncForStructWithDartKeywordFieldTwinNormal( + {required StructWithDartKeywordFieldTwinNormal arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + arg); + return wire + .wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_struct_with_dart_keyword_field_twin_normal, + decodeErrorData: null, + ), + constMeta: + kCrateApiStructureFuncForStructWithDartKeywordFieldTwinNormalConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiStructureFuncForStructWithDartKeywordFieldTwinNormalConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_dart_keyword_field_twin_normal", + argNames: ["arg"], + ); + + @override + Future + crateApiStructureFuncForStructWithFieldRenameTwinNormal( + {required StructWithFieldRenameTwinNormal arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_box_autoadd_struct_with_field_rename_twin_normal(arg); + return wire + .wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_struct_with_field_rename_twin_normal, + decodeErrorData: null, + ), + constMeta: + kCrateApiStructureFuncForStructWithFieldRenameTwinNormalConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiStructureFuncForStructWithFieldRenameTwinNormalConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_field_rename_twin_normal", + argNames: ["arg"], + ); + @override Future crateApiStructureFuncStructWithOneFieldTwinNormal( @@ -103652,6 +104083,54 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return dco_decode_struct_with_custom_name_method_twin_normal(raw); } + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_dart_keyword_field_twin_normal(raw); + } + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_dart_keyword_field_twin_rust_async(raw); + } + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async_sse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_dart_keyword_field_twin_rust_async_sse(raw); + } + + @protected + StructWithDartKeywordFieldTwinSse + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_dart_keyword_field_twin_sse(raw); + } + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_dart_keyword_field_twin_sync(raw); + } + + @protected + StructWithDartKeywordFieldTwinSyncSse + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync_sse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_dart_keyword_field_twin_sync_sse(raw); + } + @protected StructWithEnumTwinNormal dco_decode_box_autoadd_struct_with_enum_twin_normal( dynamic raw) { @@ -103795,6 +104274,51 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { raw); } + @protected + StructWithFieldRenameTwinNormal + dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_field_rename_twin_normal(raw); + } + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_field_rename_twin_rust_async(raw); + } + + @protected + StructWithFieldRenameTwinRustAsyncSse + dco_decode_box_autoadd_struct_with_field_rename_twin_rust_async_sse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_field_rename_twin_rust_async_sse(raw); + } + + @protected + StructWithFieldRenameTwinSse + dco_decode_box_autoadd_struct_with_field_rename_twin_sse(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_field_rename_twin_sse(raw); + } + + @protected + StructWithFieldRenameTwinSync + dco_decode_box_autoadd_struct_with_field_rename_twin_sync(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_field_rename_twin_sync(raw); + } + + @protected + StructWithFieldRenameTwinSyncSse + dco_decode_box_autoadd_struct_with_field_rename_twin_sync_sse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_field_rename_twin_sync_sse(raw); + } + @protected StructWithGoodAndOpaqueFieldTwinMoi dco_decode_box_autoadd_struct_with_good_and_opaque_field_twin_moi( @@ -110283,7 +110807,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return MoreThanJustOneRawStringStructTwinNormal( regular: dco_decode_String(arr[0]), type: dco_decode_String(arr[1]), - async: dco_decode_bool(arr[2]), + async_: dco_decode_bool(arr[2]), another: dco_decode_String(arr[3]), ); } @@ -110299,7 +110823,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return MoreThanJustOneRawStringStructTwinRustAsync( regular: dco_decode_String(arr[0]), type: dco_decode_String(arr[1]), - async: dco_decode_bool(arr[2]), + async_: dco_decode_bool(arr[2]), another: dco_decode_String(arr[3]), ); } @@ -110315,7 +110839,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return MoreThanJustOneRawStringStructTwinRustAsyncSse( regular: dco_decode_String(arr[0]), type: dco_decode_String(arr[1]), - async: dco_decode_bool(arr[2]), + async_: dco_decode_bool(arr[2]), another: dco_decode_String(arr[3]), ); } @@ -110330,7 +110854,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return MoreThanJustOneRawStringStructTwinSse( regular: dco_decode_String(arr[0]), type: dco_decode_String(arr[1]), - async: dco_decode_bool(arr[2]), + async_: dco_decode_bool(arr[2]), another: dco_decode_String(arr[3]), ); } @@ -110345,7 +110869,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return MoreThanJustOneRawStringStructTwinSync( regular: dco_decode_String(arr[0]), type: dco_decode_String(arr[1]), - async: dco_decode_bool(arr[2]), + async_: dco_decode_bool(arr[2]), another: dco_decode_String(arr[3]), ); } @@ -110361,7 +110885,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return MoreThanJustOneRawStringStructTwinSyncSse( regular: dco_decode_String(arr[0]), type: dco_decode_String(arr[1]), - async: dco_decode_bool(arr[2]), + async_: dco_decode_bool(arr[2]), another: dco_decode_String(arr[3]), ); } @@ -114186,6 +114710,85 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); } + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return StructWithDartKeywordFieldTwinNormal( + class_: dco_decode_i_32(arr[0]), + interface_: dco_decode_i_64(arr[1]), + ); + } + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_struct_with_dart_keyword_field_twin_rust_async(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return StructWithDartKeywordFieldTwinRustAsync( + class_: dco_decode_i_32(arr[0]), + interface_: dco_decode_i_64(arr[1]), + ); + } + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + dco_decode_struct_with_dart_keyword_field_twin_rust_async_sse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return StructWithDartKeywordFieldTwinRustAsyncSse( + class_: dco_decode_i_32(arr[0]), + interface_: dco_decode_i_64(arr[1]), + ); + } + + @protected + StructWithDartKeywordFieldTwinSse + dco_decode_struct_with_dart_keyword_field_twin_sse(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return StructWithDartKeywordFieldTwinSse( + class_: dco_decode_i_32(arr[0]), + interface_: dco_decode_i_64(arr[1]), + ); + } + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_struct_with_dart_keyword_field_twin_sync(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return StructWithDartKeywordFieldTwinSync( + class_: dco_decode_i_32(arr[0]), + interface_: dco_decode_i_64(arr[1]), + ); + } + + @protected + StructWithDartKeywordFieldTwinSyncSse + dco_decode_struct_with_dart_keyword_field_twin_sync_sse(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return StructWithDartKeywordFieldTwinSyncSse( + class_: dco_decode_i_32(arr[0]), + interface_: dco_decode_i_64(arr[1]), + ); + } + @protected StructWithEnumTwinNormal dco_decode_struct_with_enum_twin_normal( dynamic raw) { @@ -114451,6 +115054,78 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); } + @protected + StructWithFieldRenameTwinNormal + dco_decode_struct_with_field_rename_twin_normal(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 StructWithFieldRenameTwinNormal( + renamed_field: dco_decode_i_32(arr[0]), + ); + } + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_struct_with_field_rename_twin_rust_async(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 StructWithFieldRenameTwinRustAsync( + renamed_field: dco_decode_i_32(arr[0]), + ); + } + + @protected + StructWithFieldRenameTwinRustAsyncSse + dco_decode_struct_with_field_rename_twin_rust_async_sse(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 StructWithFieldRenameTwinRustAsyncSse( + renamed_field: dco_decode_i_32(arr[0]), + ); + } + + @protected + StructWithFieldRenameTwinSse dco_decode_struct_with_field_rename_twin_sse( + 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 StructWithFieldRenameTwinSse( + renamed_field: dco_decode_i_32(arr[0]), + ); + } + + @protected + StructWithFieldRenameTwinSync dco_decode_struct_with_field_rename_twin_sync( + 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 StructWithFieldRenameTwinSync( + renamed_field: dco_decode_i_32(arr[0]), + ); + } + + @protected + StructWithFieldRenameTwinSyncSse + dco_decode_struct_with_field_rename_twin_sync_sse(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 StructWithFieldRenameTwinSyncSse( + renamed_field: dco_decode_i_32(arr[0]), + ); + } + @protected StructWithGoodAndOpaqueFieldTwinMoi dco_decode_struct_with_good_and_opaque_field_twin_moi(dynamic raw) { @@ -124649,6 +125324,58 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { deserializer)); } + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_dart_keyword_field_twin_normal( + deserializer)); + } + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_dart_keyword_field_twin_rust_async( + deserializer)); + } + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_dart_keyword_field_twin_rust_async_sse( + deserializer)); + } + + @protected + StructWithDartKeywordFieldTwinSse + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_dart_keyword_field_twin_sse(deserializer)); + } + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_dart_keyword_field_twin_sync(deserializer)); + } + + @protected + StructWithDartKeywordFieldTwinSyncSse + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_dart_keyword_field_twin_sync_sse( + deserializer)); + } + @protected StructWithEnumTwinNormal sse_decode_box_autoadd_struct_with_enum_twin_normal( SseDeserializer deserializer) { @@ -124802,6 +125529,55 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { deserializer)); } + @protected + StructWithFieldRenameTwinNormal + sse_decode_box_autoadd_struct_with_field_rename_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_field_rename_twin_normal(deserializer)); + } + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_field_rename_twin_rust_async(deserializer)); + } + + @protected + StructWithFieldRenameTwinRustAsyncSse + sse_decode_box_autoadd_struct_with_field_rename_twin_rust_async_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_field_rename_twin_rust_async_sse( + deserializer)); + } + + @protected + StructWithFieldRenameTwinSse + sse_decode_box_autoadd_struct_with_field_rename_twin_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_field_rename_twin_sse(deserializer)); + } + + @protected + StructWithFieldRenameTwinSync + sse_decode_box_autoadd_struct_with_field_rename_twin_sync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_field_rename_twin_sync(deserializer)); + } + + @protected + StructWithFieldRenameTwinSyncSse + sse_decode_box_autoadd_struct_with_field_rename_twin_sync_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_field_rename_twin_sync_sse(deserializer)); + } + @protected StructWithGoodAndOpaqueFieldTwinMoi sse_decode_box_autoadd_struct_with_good_and_opaque_field_twin_moi( @@ -132272,12 +133048,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs var var_regular = sse_decode_String(deserializer); var var_type = sse_decode_String(deserializer); - var var_async = sse_decode_bool(deserializer); + var var_async_ = sse_decode_bool(deserializer); var var_another = sse_decode_String(deserializer); return MoreThanJustOneRawStringStructTwinNormal( regular: var_regular, type: var_type, - async: var_async, + async_: var_async_, another: var_another); } @@ -132288,12 +133064,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs var var_regular = sse_decode_String(deserializer); var var_type = sse_decode_String(deserializer); - var var_async = sse_decode_bool(deserializer); + var var_async_ = sse_decode_bool(deserializer); var var_another = sse_decode_String(deserializer); return MoreThanJustOneRawStringStructTwinRustAsync( regular: var_regular, type: var_type, - async: var_async, + async_: var_async_, another: var_another); } @@ -132304,12 +133080,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs var var_regular = sse_decode_String(deserializer); var var_type = sse_decode_String(deserializer); - var var_async = sse_decode_bool(deserializer); + var var_async_ = sse_decode_bool(deserializer); var var_another = sse_decode_String(deserializer); return MoreThanJustOneRawStringStructTwinRustAsyncSse( regular: var_regular, type: var_type, - async: var_async, + async_: var_async_, another: var_another); } @@ -132320,12 +133096,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs var var_regular = sse_decode_String(deserializer); var var_type = sse_decode_String(deserializer); - var var_async = sse_decode_bool(deserializer); + var var_async_ = sse_decode_bool(deserializer); var var_another = sse_decode_String(deserializer); return MoreThanJustOneRawStringStructTwinSse( regular: var_regular, type: var_type, - async: var_async, + async_: var_async_, another: var_another); } @@ -132336,12 +133112,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs var var_regular = sse_decode_String(deserializer); var var_type = sse_decode_String(deserializer); - var var_async = sse_decode_bool(deserializer); + var var_async_ = sse_decode_bool(deserializer); var var_another = sse_decode_String(deserializer); return MoreThanJustOneRawStringStructTwinSync( regular: var_regular, type: var_type, - async: var_async, + async_: var_async_, another: var_another); } @@ -132352,12 +133128,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs var var_regular = sse_decode_String(deserializer); var var_type = sse_decode_String(deserializer); - var var_async = sse_decode_bool(deserializer); + var var_async_ = sse_decode_bool(deserializer); var var_another = sse_decode_String(deserializer); return MoreThanJustOneRawStringStructTwinSyncSse( regular: var_regular, type: var_type, - async: var_async, + async_: var_async_, another: var_another); } @@ -136294,6 +137070,72 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return StructWithCustomNameMethodTwinNormal(field0: var_field0); } + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_class_ = sse_decode_i_32(deserializer); + var var_interface_ = sse_decode_i_64(deserializer); + return StructWithDartKeywordFieldTwinNormal( + class_: var_class_, interface_: var_interface_); + } + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_class_ = sse_decode_i_32(deserializer); + var var_interface_ = sse_decode_i_64(deserializer); + return StructWithDartKeywordFieldTwinRustAsync( + class_: var_class_, interface_: var_interface_); + } + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + sse_decode_struct_with_dart_keyword_field_twin_rust_async_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_class_ = sse_decode_i_32(deserializer); + var var_interface_ = sse_decode_i_64(deserializer); + return StructWithDartKeywordFieldTwinRustAsyncSse( + class_: var_class_, interface_: var_interface_); + } + + @protected + StructWithDartKeywordFieldTwinSse + sse_decode_struct_with_dart_keyword_field_twin_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_class_ = sse_decode_i_32(deserializer); + var var_interface_ = sse_decode_i_64(deserializer); + return StructWithDartKeywordFieldTwinSse( + class_: var_class_, interface_: var_interface_); + } + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_class_ = sse_decode_i_32(deserializer); + var var_interface_ = sse_decode_i_64(deserializer); + return StructWithDartKeywordFieldTwinSync( + class_: var_class_, interface_: var_interface_); + } + + @protected + StructWithDartKeywordFieldTwinSyncSse + sse_decode_struct_with_dart_keyword_field_twin_sync_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_class_ = sse_decode_i_32(deserializer); + var var_interface_ = sse_decode_i_64(deserializer); + return StructWithDartKeywordFieldTwinSyncSse( + class_: var_class_, interface_: var_interface_); + } + @protected StructWithEnumTwinNormal sse_decode_struct_with_enum_twin_normal( SseDeserializer deserializer) { @@ -136505,6 +137347,59 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { autoOpaque: var_autoOpaque, normal: var_normal); } + @protected + StructWithFieldRenameTwinNormal + sse_decode_struct_with_field_rename_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_renamed_field = sse_decode_i_32(deserializer); + return StructWithFieldRenameTwinNormal(renamed_field: var_renamed_field); + } + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_renamed_field = sse_decode_i_32(deserializer); + return StructWithFieldRenameTwinRustAsync(renamed_field: var_renamed_field); + } + + @protected + StructWithFieldRenameTwinRustAsyncSse + sse_decode_struct_with_field_rename_twin_rust_async_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_renamed_field = sse_decode_i_32(deserializer); + return StructWithFieldRenameTwinRustAsyncSse( + renamed_field: var_renamed_field); + } + + @protected + StructWithFieldRenameTwinSse sse_decode_struct_with_field_rename_twin_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_renamed_field = sse_decode_i_32(deserializer); + return StructWithFieldRenameTwinSse(renamed_field: var_renamed_field); + } + + @protected + StructWithFieldRenameTwinSync sse_decode_struct_with_field_rename_twin_sync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_renamed_field = sse_decode_i_32(deserializer); + return StructWithFieldRenameTwinSync(renamed_field: var_renamed_field); + } + + @protected + StructWithFieldRenameTwinSyncSse + sse_decode_struct_with_field_rename_twin_sync_sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_renamed_field = sse_decode_i_32(deserializer); + return StructWithFieldRenameTwinSyncSse(renamed_field: var_renamed_field); + } + @protected StructWithGoodAndOpaqueFieldTwinMoi sse_decode_struct_with_good_and_opaque_field_twin_moi( @@ -150145,6 +151040,51 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_struct_with_custom_name_method_twin_normal(self, serializer); } + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_dart_keyword_field_twin_normal(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_dart_keyword_field_twin_rust_async(self, serializer); + } + + @protected + void + sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async_sse( + StructWithDartKeywordFieldTwinRustAsyncSse self, + SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_dart_keyword_field_twin_rust_async_sse( + self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sse( + StructWithDartKeywordFieldTwinSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_dart_keyword_field_twin_sse(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_dart_keyword_field_twin_sync(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync_sse( + StructWithDartKeywordFieldTwinSyncSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_dart_keyword_field_twin_sync_sse(self, serializer); + } + @protected void sse_encode_box_autoadd_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer) { @@ -150302,6 +151242,48 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { self, serializer); } + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_field_rename_twin_normal(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_field_rename_twin_rust_async(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_rust_async_sse( + StructWithFieldRenameTwinRustAsyncSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_field_rename_twin_rust_async_sse(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sse( + StructWithFieldRenameTwinSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_field_rename_twin_sse(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_field_rename_twin_sync(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sync_sse( + StructWithFieldRenameTwinSyncSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_field_rename_twin_sync_sse(self, serializer); + } + @protected void sse_encode_box_autoadd_struct_with_good_and_opaque_field_twin_moi( StructWithGoodAndOpaqueFieldTwinMoi self, SseSerializer serializer) { @@ -156600,7 +157582,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.regular, serializer); sse_encode_String(self.type, serializer); - sse_encode_bool(self.async, serializer); + sse_encode_bool(self.async_, serializer); sse_encode_String(self.another, serializer); } @@ -156611,7 +157593,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.regular, serializer); sse_encode_String(self.type, serializer); - sse_encode_bool(self.async, serializer); + sse_encode_bool(self.async_, serializer); sse_encode_String(self.another, serializer); } @@ -156622,7 +157604,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.regular, serializer); sse_encode_String(self.type, serializer); - sse_encode_bool(self.async, serializer); + sse_encode_bool(self.async_, serializer); sse_encode_String(self.another, serializer); } @@ -156632,7 +157614,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.regular, serializer); sse_encode_String(self.type, serializer); - sse_encode_bool(self.async, serializer); + sse_encode_bool(self.async_, serializer); sse_encode_String(self.another, serializer); } @@ -156642,7 +157624,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.regular, serializer); sse_encode_String(self.type, serializer); - sse_encode_bool(self.async, serializer); + sse_encode_bool(self.async_, serializer); sse_encode_String(self.another, serializer); } @@ -156653,7 +157635,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.regular, serializer); sse_encode_String(self.type, serializer); - sse_encode_bool(self.async, serializer); + sse_encode_bool(self.async_, serializer); sse_encode_String(self.another, serializer); } @@ -160016,6 +160998,55 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(self.field0, serializer); } + @protected + void sse_encode_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.class_, serializer); + sse_encode_i_64(self.interface_, serializer); + } + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.class_, serializer); + sse_encode_i_64(self.interface_, serializer); + } + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_rust_async_sse( + StructWithDartKeywordFieldTwinRustAsyncSse self, + SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.class_, serializer); + sse_encode_i_64(self.interface_, serializer); + } + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sse( + StructWithDartKeywordFieldTwinSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.class_, serializer); + sse_encode_i_64(self.interface_, serializer); + } + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.class_, serializer); + sse_encode_i_64(self.interface_, serializer); + } + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sync_sse( + StructWithDartKeywordFieldTwinSyncSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.class_, serializer); + sse_encode_i_64(self.interface_, serializer); + } + @protected void sse_encode_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer) { @@ -160183,6 +161214,48 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(self.normal, serializer); } + @protected + void sse_encode_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.renamed_field, serializer); + } + + @protected + void sse_encode_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.renamed_field, serializer); + } + + @protected + void sse_encode_struct_with_field_rename_twin_rust_async_sse( + StructWithFieldRenameTwinRustAsyncSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.renamed_field, serializer); + } + + @protected + void sse_encode_struct_with_field_rename_twin_sse( + StructWithFieldRenameTwinSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.renamed_field, serializer); + } + + @protected + void sse_encode_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.renamed_field, serializer); + } + + @protected + void sse_encode_struct_with_field_rename_twin_sync_sse( + StructWithFieldRenameTwinSyncSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.renamed_field, serializer); + } + @protected void sse_encode_struct_with_good_and_opaque_field_twin_moi( StructWithGoodAndOpaqueFieldTwinMoi self, SseSerializer serializer) { 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 0d91778010..1fe1b4d303 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 @@ -5575,6 +5575,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_box_autoadd_struct_with_custom_name_method_twin_normal( dynamic raw); + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async_sse( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSse + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sse( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSyncSse + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync_sse( + dynamic raw); + @protected StructWithEnumTwinNormal dco_decode_box_autoadd_struct_with_enum_twin_normal( dynamic raw); @@ -5659,6 +5689,33 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync_sse_moi( dynamic raw); + @protected + StructWithFieldRenameTwinNormal + dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsyncSse + dco_decode_box_autoadd_struct_with_field_rename_twin_rust_async_sse( + dynamic raw); + + @protected + StructWithFieldRenameTwinSse + dco_decode_box_autoadd_struct_with_field_rename_twin_sse(dynamic raw); + + @protected + StructWithFieldRenameTwinSync + dco_decode_box_autoadd_struct_with_field_rename_twin_sync(dynamic raw); + + @protected + StructWithFieldRenameTwinSyncSse + dco_decode_box_autoadd_struct_with_field_rename_twin_sync_sse( + dynamic raw); + @protected StructWithGoodAndOpaqueFieldTwinMoi dco_decode_box_autoadd_struct_with_good_and_opaque_field_twin_moi( @@ -9146,6 +9203,31 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithCustomNameMethodTwinNormal dco_decode_struct_with_custom_name_method_twin_normal(dynamic raw); + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_struct_with_dart_keyword_field_twin_rust_async(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + dco_decode_struct_with_dart_keyword_field_twin_rust_async_sse( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSse + dco_decode_struct_with_dart_keyword_field_twin_sse(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_struct_with_dart_keyword_field_twin_sync(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSyncSse + dco_decode_struct_with_dart_keyword_field_twin_sync_sse(dynamic raw); + @protected StructWithEnumTwinNormal dco_decode_struct_with_enum_twin_normal(dynamic raw); @@ -9224,6 +9306,30 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_struct_with_explicit_auto_opaque_field_twin_sync_sse_moi( dynamic raw); + @protected + StructWithFieldRenameTwinNormal + dco_decode_struct_with_field_rename_twin_normal(dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_struct_with_field_rename_twin_rust_async(dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsyncSse + dco_decode_struct_with_field_rename_twin_rust_async_sse(dynamic raw); + + @protected + StructWithFieldRenameTwinSse dco_decode_struct_with_field_rename_twin_sse( + dynamic raw); + + @protected + StructWithFieldRenameTwinSync dco_decode_struct_with_field_rename_twin_sync( + dynamic raw); + + @protected + StructWithFieldRenameTwinSyncSse + dco_decode_struct_with_field_rename_twin_sync_sse(dynamic raw); + @protected StructWithGoodAndOpaqueFieldTwinMoi dco_decode_struct_with_good_and_opaque_field_twin_moi(dynamic raw); @@ -14324,6 +14430,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_struct_with_custom_name_method_twin_normal( SseDeserializer deserializer); + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async_sse( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSse + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sse( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSyncSse + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync_sse( + SseDeserializer deserializer); + @protected StructWithEnumTwinNormal sse_decode_box_autoadd_struct_with_enum_twin_normal( SseDeserializer deserializer); @@ -14411,6 +14547,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync_sse_moi( SseDeserializer deserializer); + @protected + StructWithFieldRenameTwinNormal + sse_decode_box_autoadd_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsyncSse + sse_decode_box_autoadd_struct_with_field_rename_twin_rust_async_sse( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSse + sse_decode_box_autoadd_struct_with_field_rename_twin_sse( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSync + sse_decode_box_autoadd_struct_with_field_rename_twin_sync( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSyncSse + sse_decode_box_autoadd_struct_with_field_rename_twin_sync_sse( + SseDeserializer deserializer); + @protected StructWithGoodAndOpaqueFieldTwinMoi sse_decode_box_autoadd_struct_with_good_and_opaque_field_twin_moi( @@ -18387,6 +18553,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_struct_with_custom_name_method_twin_normal( SseDeserializer deserializer); + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + sse_decode_struct_with_dart_keyword_field_twin_rust_async_sse( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSse + sse_decode_struct_with_dart_keyword_field_twin_sse( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSyncSse + sse_decode_struct_with_dart_keyword_field_twin_sync_sse( + SseDeserializer deserializer); + @protected StructWithEnumTwinNormal sse_decode_struct_with_enum_twin_normal( SseDeserializer deserializer); @@ -18472,6 +18668,34 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_struct_with_explicit_auto_opaque_field_twin_sync_sse_moi( SseDeserializer deserializer); + @protected + StructWithFieldRenameTwinNormal + sse_decode_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsyncSse + sse_decode_struct_with_field_rename_twin_rust_async_sse( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSse sse_decode_struct_with_field_rename_twin_sse( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSync sse_decode_struct_with_field_rename_twin_sync( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSyncSse + sse_decode_struct_with_field_rename_twin_sync_sse( + SseDeserializer deserializer); + @protected StructWithGoodAndOpaqueFieldTwinMoi sse_decode_struct_with_good_and_opaque_field_twin_moi( @@ -21703,6 +21927,41 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return ptr; } + @protected + ffi.Pointer + cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = + wire.cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal(); + cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_normal( + raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire + .cst_new_box_autoadd_struct_with_dart_keyword_field_twin_rust_async(); + cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_rust_async( + raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = + wire.cst_new_box_autoadd_struct_with_dart_keyword_field_twin_sync(); + cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_sync(raw, ptr.ref); + return ptr; + } + @protected ffi.Pointer cst_encode_box_autoadd_struct_with_enum_twin_normal( @@ -21806,6 +22065,37 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return ptr; } + @protected + ffi.Pointer + cst_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_struct_with_field_rename_twin_normal(); + cst_api_fill_to_wire_struct_with_field_rename_twin_normal(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = + wire.cst_new_box_autoadd_struct_with_field_rename_twin_rust_async(); + cst_api_fill_to_wire_struct_with_field_rename_twin_rust_async(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_struct_with_field_rename_twin_sync(); + cst_api_fill_to_wire_struct_with_field_rename_twin_sync(raw, ptr.ref); + return ptr; + } + @protected ffi.Pointer cst_encode_box_autoadd_struct_with_good_and_opaque_field_twin_moi( @@ -26620,6 +26910,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { apiObj, wireObj.ref); } + @protected + void + cst_api_fill_to_wire_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal apiObj, + ffi.Pointer + wireObj) { + cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_normal( + apiObj, wireObj.ref); + } + + @protected + void + cst_api_fill_to_wire_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync apiObj, + ffi.Pointer + wireObj) { + cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_rust_async( + apiObj, wireObj.ref); + } + + @protected + void + cst_api_fill_to_wire_box_autoadd_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync apiObj, + ffi.Pointer + wireObj) { + cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_sync( + apiObj, wireObj.ref); + } + @protected void cst_api_fill_to_wire_box_autoadd_struct_with_enum_twin_normal( StructWithEnumTwinNormal apiObj, @@ -26703,6 +27023,32 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { apiObj, wireObj.ref); } + @protected + void cst_api_fill_to_wire_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_struct_with_field_rename_twin_normal( + apiObj, wireObj.ref); + } + + @protected + void + cst_api_fill_to_wire_box_autoadd_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync apiObj, + ffi.Pointer + wireObj) { + cst_api_fill_to_wire_struct_with_field_rename_twin_rust_async( + apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_struct_with_field_rename_twin_sync( + apiObj, wireObj.ref); + } + @protected void cst_api_fill_to_wire_box_autoadd_struct_with_good_and_opaque_field_twin_moi( @@ -28812,7 +29158,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wire_cst_more_than_just_one_raw_string_struct_twin_normal wireObj) { wireObj.regular = cst_encode_String(apiObj.regular); wireObj.type = cst_encode_String(apiObj.type); - wireObj.async1 = cst_encode_bool(apiObj.async); + wireObj.async1 = cst_encode_bool(apiObj.async_); wireObj.another = cst_encode_String(apiObj.another); } @@ -28824,7 +29170,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wireObj) { wireObj.regular = cst_encode_String(apiObj.regular); wireObj.type = cst_encode_String(apiObj.type); - wireObj.async1 = cst_encode_bool(apiObj.async); + wireObj.async1 = cst_encode_bool(apiObj.async_); wireObj.another = cst_encode_String(apiObj.another); } @@ -28834,7 +29180,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wire_cst_more_than_just_one_raw_string_struct_twin_sync wireObj) { wireObj.regular = cst_encode_String(apiObj.regular); wireObj.type = cst_encode_String(apiObj.type); - wireObj.async1 = cst_encode_bool(apiObj.async); + wireObj.async1 = cst_encode_bool(apiObj.async_); wireObj.another = cst_encode_String(apiObj.another); } @@ -29796,6 +30142,30 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wireObj.field0 = cst_encode_i_32(apiObj.field0); } + @protected + void cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal apiObj, + wire_cst_struct_with_dart_keyword_field_twin_normal wireObj) { + wireObj.class_ = cst_encode_i_32(apiObj.class_); + wireObj.interface1 = cst_encode_i_64(apiObj.interface_); + } + + @protected + void cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync apiObj, + wire_cst_struct_with_dart_keyword_field_twin_rust_async wireObj) { + wireObj.class_ = cst_encode_i_32(apiObj.class_); + wireObj.interface1 = cst_encode_i_64(apiObj.interface_); + } + + @protected + void cst_api_fill_to_wire_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync apiObj, + wire_cst_struct_with_dart_keyword_field_twin_sync wireObj) { + wireObj.class_ = cst_encode_i_32(apiObj.class_); + wireObj.interface1 = cst_encode_i_64(apiObj.interface_); + } + @protected void cst_api_fill_to_wire_struct_with_enum_twin_normal( StructWithEnumTwinNormal apiObj, @@ -29886,6 +30256,27 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wireObj.normal = cst_encode_i_32(apiObj.normal); } + @protected + void cst_api_fill_to_wire_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal apiObj, + wire_cst_struct_with_field_rename_twin_normal wireObj) { + wireObj.class_ = cst_encode_i_32(apiObj.renamed_field); + } + + @protected + void cst_api_fill_to_wire_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync apiObj, + wire_cst_struct_with_field_rename_twin_rust_async wireObj) { + wireObj.class_ = cst_encode_i_32(apiObj.renamed_field); + } + + @protected + void cst_api_fill_to_wire_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync apiObj, + wire_cst_struct_with_field_rename_twin_sync wireObj) { + wireObj.class_ = cst_encode_i_32(apiObj.renamed_field); + } + @protected void cst_api_fill_to_wire_struct_with_good_and_opaque_field_twin_moi( StructWithGoodAndOpaqueFieldTwinMoi apiObj, @@ -36176,6 +36567,32 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_struct_with_custom_name_method_twin_normal( StructWithCustomNameMethodTwinNormal self, SseSerializer serializer); + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async_sse( + StructWithDartKeywordFieldTwinRustAsyncSse self, + SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sse( + StructWithDartKeywordFieldTwinSse self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync_sse( + StructWithDartKeywordFieldTwinSyncSse self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer); @@ -36266,6 +36683,30 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithExplicitAutoOpaqueFieldTwinSyncSseMoi self, SseSerializer serializer); + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_rust_async_sse( + StructWithFieldRenameTwinRustAsyncSse self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sse( + StructWithFieldRenameTwinSse self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sync_sse( + StructWithFieldRenameTwinSyncSse self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_good_and_opaque_field_twin_moi( StructWithGoodAndOpaqueFieldTwinMoi self, SseSerializer serializer); @@ -40052,6 +40493,31 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_struct_with_custom_name_method_twin_normal( StructWithCustomNameMethodTwinNormal self, SseSerializer serializer); + @protected + void sse_encode_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_rust_async_sse( + StructWithDartKeywordFieldTwinRustAsyncSse self, + SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sse( + StructWithDartKeywordFieldTwinSse self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sync_sse( + StructWithDartKeywordFieldTwinSyncSse self, SseSerializer serializer); + @protected void sse_encode_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer); @@ -40134,6 +40600,30 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithExplicitAutoOpaqueFieldTwinSyncSseMoi self, SseSerializer serializer); + @protected + void sse_encode_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_rust_async_sse( + StructWithFieldRenameTwinRustAsyncSse self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_sse( + StructWithFieldRenameTwinSse self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_sync_sse( + StructWithFieldRenameTwinSyncSse self, SseSerializer serializer); + @protected void sse_encode_struct_with_good_and_opaque_field_twin_moi( StructWithGoodAndOpaqueFieldTwinMoi self, SseSerializer serializer); @@ -97191,6 +97681,60 @@ class RustLibWire implements BaseWire { _wire__crate__api__pseudo_manual__stream_twin_sse__stream_sink_inside_vec_twin_ssePtr .asFunction, int, int)>(); + void + wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async( + int port_, + ffi.Pointer arg, + ) { + return _wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async( + port_, + arg, + ); + } + + late final _wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_asyncPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_rust_async>)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async'); + late final _wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async = + _wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_asyncPtr + .asFunction< + void Function( + int, + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_rust_async>)>(); + + void + wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async( + int port_, + ffi.Pointer arg, + ) { + return _wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async( + port_, + arg, + ); + } + + late final _wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_asyncPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer< + wire_cst_struct_with_field_rename_twin_rust_async>)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async'); + late final _wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async = + _wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_asyncPtr + .asFunction< + void Function( + int, + ffi.Pointer< + wire_cst_struct_with_field_rename_twin_rust_async>)>(); + void wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_one_field_twin_rust_async( int port_, @@ -97326,6 +97870,56 @@ class RustLibWire implements BaseWire { ffi.Pointer< wire_cst_tuple_struct_with_two_field_twin_rust_async>)>(); + void + wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse( + int port_, + ffi.Pointer ptr_, + int rust_vec_len_, + int data_len_, + ) { + return _wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse( + port_, + ptr_, + rust_vec_len_, + data_len_, + ); + } + + late final _wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_ssePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Int32, ffi.Int32)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse'); + late final _wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse = + _wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_ssePtr + .asFunction, int, int)>(); + + void + wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse( + int port_, + ffi.Pointer ptr_, + int rust_vec_len_, + int data_len_, + ) { + return _wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse( + port_, + ptr_, + rust_vec_len_, + data_len_, + ); + } + + late final _wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_ssePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Int32, ffi.Int32)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse'); + late final _wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse = + _wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_ssePtr + .asFunction, int, int)>(); + void wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_struct_with_one_field_twin_rust_async_sse( int port_, @@ -97451,6 +98045,56 @@ class RustLibWire implements BaseWire { _wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_tuple_struct_with_two_field_twin_rust_async_ssePtr .asFunction, int, int)>(); + void + wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse( + int port_, + ffi.Pointer ptr_, + int rust_vec_len_, + int data_len_, + ) { + return _wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse( + port_, + ptr_, + rust_vec_len_, + data_len_, + ); + } + + late final _wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_ssePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Int32, ffi.Int32)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse'); + late final _wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse = + _wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_ssePtr + .asFunction, int, int)>(); + + void + wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse( + int port_, + ffi.Pointer ptr_, + int rust_vec_len_, + int data_len_, + ) { + return _wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse( + port_, + ptr_, + rust_vec_len_, + data_len_, + ); + } + + late final _wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_ssePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Int32, ffi.Int32)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse'); + late final _wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse = + _wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_ssePtr + .asFunction, int, int)>(); + void wire__crate__api__pseudo_manual__structure_twin_sse__func_struct_with_one_field_twin_sse( int port_, @@ -97576,6 +98220,51 @@ class RustLibWire implements BaseWire { _wire__crate__api__pseudo_manual__structure_twin_sse__func_tuple_struct_with_two_field_twin_ssePtr .asFunction, int, int)>(); + WireSyncRust2DartDco + wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync( + ffi.Pointer arg, + ) { + return _wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync( + arg, + ); + } + + late final _wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_syncPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_sync>)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync'); + late final _wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync = + _wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_syncPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_sync>)>(); + + WireSyncRust2DartDco + wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync( + ffi.Pointer arg, + ) { + return _wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync( + arg, + ); + } + + late final _wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_syncPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer< + wire_cst_struct_with_field_rename_twin_sync>)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync'); + late final _wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync = + _wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_syncPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + WireSyncRust2DartDco wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_one_field_twin_sync( ffi.Pointer arg, @@ -97685,6 +98374,56 @@ class RustLibWire implements BaseWire { ffi.Pointer< wire_cst_tuple_struct_with_two_field_twin_sync>)>(); + WireSyncRust2DartSse + wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse( + ffi.Pointer ptr_, + int rust_vec_len_, + int data_len_, + ) { + return _wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse( + ptr_, + rust_vec_len_, + data_len_, + ); + } + + late final _wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_ssePtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartSse Function( + ffi.Pointer, ffi.Int32, ffi.Int32)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse'); + late final _wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse = + _wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_ssePtr + .asFunction< + WireSyncRust2DartSse Function( + ffi.Pointer, int, int)>(); + + WireSyncRust2DartSse + wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse( + ffi.Pointer ptr_, + int rust_vec_len_, + int data_len_, + ) { + return _wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse( + ptr_, + rust_vec_len_, + data_len_, + ); + } + + late final _wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_ssePtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartSse Function( + ffi.Pointer, ffi.Int32, ffi.Int32)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse'); + late final _wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse = + _wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_ssePtr + .asFunction< + WireSyncRust2DartSse Function( + ffi.Pointer, int, int)>(); + WireSyncRust2DartSse wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_struct_with_one_field_twin_sync_sse( ffi.Pointer ptr_, @@ -100273,6 +101012,60 @@ class RustLibWire implements BaseWire { .asFunction< void Function(int, ffi.Pointer)>(); + void + wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal( + int port_, + ffi.Pointer arg, + ) { + return _wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal( + port_, + arg, + ); + } + + late final _wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normalPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_normal>)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal'); + late final _wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal = + _wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normalPtr + .asFunction< + void Function( + int, + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_normal>)>(); + + void + wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal( + int port_, + ffi.Pointer arg, + ) { + return _wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal( + port_, + arg, + ); + } + + late final _wire__crate__api__structure__func_for_struct_with_field_rename_twin_normalPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer< + wire_cst_struct_with_field_rename_twin_normal>)>>( + 'frbgen_frb_example_pure_dart_wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal'); + late final _wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal = + _wire__crate__api__structure__func_for_struct_with_field_rename_twin_normalPtr + .asFunction< + void Function( + int, + ffi.Pointer< + wire_cst_struct_with_field_rename_twin_normal>)>(); + void wire__crate__api__structure__func_struct_with_one_field_twin_normal( int port_, ffi.Pointer arg, @@ -109574,6 +110367,60 @@ class RustLibWire implements BaseWire { ffi.Pointer Function()>(); + ffi.Pointer + cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal() { + return _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal(); + } + + late final _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normalPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_normal> + Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal'); + late final _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal = + _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normalPtr + .asFunction< + ffi.Pointer + Function()>(); + + ffi.Pointer + cst_new_box_autoadd_struct_with_dart_keyword_field_twin_rust_async() { + return _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_rust_async(); + } + + late final _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_rust_asyncPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_rust_async> + Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_rust_async'); + late final _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_rust_async = + _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_rust_asyncPtr + .asFunction< + ffi.Pointer< + wire_cst_struct_with_dart_keyword_field_twin_rust_async> + Function()>(); + + ffi.Pointer + cst_new_box_autoadd_struct_with_dart_keyword_field_twin_sync() { + return _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_sync(); + } + + late final _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_syncPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer + Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_sync'); + late final _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_sync = + _cst_new_box_autoadd_struct_with_dart_keyword_field_twin_syncPtr + .asFunction< + ffi.Pointer + Function()>(); + ffi.Pointer cst_new_box_autoadd_struct_with_enum_twin_normal() { return _cst_new_box_autoadd_struct_with_enum_twin_normal(); @@ -109729,6 +110576,53 @@ class RustLibWire implements BaseWire { wire_cst_struct_with_explicit_auto_opaque_field_twin_sync_moi> Function()>(); + ffi.Pointer + cst_new_box_autoadd_struct_with_field_rename_twin_normal() { + return _cst_new_box_autoadd_struct_with_field_rename_twin_normal(); + } + + late final _cst_new_box_autoadd_struct_with_field_rename_twin_normalPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer + Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_normal'); + late final _cst_new_box_autoadd_struct_with_field_rename_twin_normal = + _cst_new_box_autoadd_struct_with_field_rename_twin_normalPtr.asFunction< + ffi.Pointer + Function()>(); + + ffi.Pointer + cst_new_box_autoadd_struct_with_field_rename_twin_rust_async() { + return _cst_new_box_autoadd_struct_with_field_rename_twin_rust_async(); + } + + late final _cst_new_box_autoadd_struct_with_field_rename_twin_rust_asyncPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer + Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_rust_async'); + late final _cst_new_box_autoadd_struct_with_field_rename_twin_rust_async = + _cst_new_box_autoadd_struct_with_field_rename_twin_rust_asyncPtr + .asFunction< + ffi.Pointer + Function()>(); + + ffi.Pointer + cst_new_box_autoadd_struct_with_field_rename_twin_sync() { + return _cst_new_box_autoadd_struct_with_field_rename_twin_sync(); + } + + late final _cst_new_box_autoadd_struct_with_field_rename_twin_syncPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer + Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_sync'); + late final _cst_new_box_autoadd_struct_with_field_rename_twin_sync = + _cst_new_box_autoadd_struct_with_field_rename_twin_syncPtr.asFunction< + ffi.Pointer + Function()>(); + ffi.Pointer cst_new_box_autoadd_struct_with_good_and_opaque_field_twin_moi() { return _cst_new_box_autoadd_struct_with_good_and_opaque_field_twin_moi(); @@ -116311,6 +117205,21 @@ final class wire_cst_list_StreamSink_i_32_Dco extends ffi.Struct { external int len; } +final class wire_cst_struct_with_dart_keyword_field_twin_rust_async + extends ffi.Struct { + @ffi.Int32() + external int class_; + + @ffi.Int64() + external int interface1; +} + +final class wire_cst_struct_with_field_rename_twin_rust_async + extends ffi.Struct { + @ffi.Int32() + external int class_; +} + final class wire_cst_struct_with_one_field_twin_rust_async extends ffi.Struct { @ffi.Int32() external int a; @@ -116342,6 +117251,20 @@ final class wire_cst_tuple_struct_with_two_field_twin_rust_async external int field1; } +final class wire_cst_struct_with_dart_keyword_field_twin_sync + extends ffi.Struct { + @ffi.Int32() + external int class_; + + @ffi.Int64() + external int interface1; +} + +final class wire_cst_struct_with_field_rename_twin_sync extends ffi.Struct { + @ffi.Int32() + external int class_; +} + final class wire_cst_struct_with_one_field_twin_sync extends ffi.Struct { @ffi.Int32() external int a; @@ -116515,6 +117438,20 @@ final class wire_cst_my_struct_containing_stream_sink_twin_normal external ffi.Pointer b; } +final class wire_cst_struct_with_dart_keyword_field_twin_normal + extends ffi.Struct { + @ffi.Int32() + external int class_; + + @ffi.Int64() + external int interface1; +} + +final class wire_cst_struct_with_field_rename_twin_normal extends ffi.Struct { + @ffi.Int32() + external int class_; +} + final class wire_cst_struct_with_one_field_twin_normal extends ffi.Struct { @ffi.Int32() external int a; 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 ca488b735f..534d597dc3 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 @@ -5577,6 +5577,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_box_autoadd_struct_with_custom_name_method_twin_normal( dynamic raw); + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async_sse( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSse + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sse( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSyncSse + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync_sse( + dynamic raw); + @protected StructWithEnumTwinNormal dco_decode_box_autoadd_struct_with_enum_twin_normal( dynamic raw); @@ -5661,6 +5691,33 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync_sse_moi( dynamic raw); + @protected + StructWithFieldRenameTwinNormal + dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsyncSse + dco_decode_box_autoadd_struct_with_field_rename_twin_rust_async_sse( + dynamic raw); + + @protected + StructWithFieldRenameTwinSse + dco_decode_box_autoadd_struct_with_field_rename_twin_sse(dynamic raw); + + @protected + StructWithFieldRenameTwinSync + dco_decode_box_autoadd_struct_with_field_rename_twin_sync(dynamic raw); + + @protected + StructWithFieldRenameTwinSyncSse + dco_decode_box_autoadd_struct_with_field_rename_twin_sync_sse( + dynamic raw); + @protected StructWithGoodAndOpaqueFieldTwinMoi dco_decode_box_autoadd_struct_with_good_and_opaque_field_twin_moi( @@ -9148,6 +9205,31 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithCustomNameMethodTwinNormal dco_decode_struct_with_custom_name_method_twin_normal(dynamic raw); + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_struct_with_dart_keyword_field_twin_rust_async(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + dco_decode_struct_with_dart_keyword_field_twin_rust_async_sse( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSse + dco_decode_struct_with_dart_keyword_field_twin_sse(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_struct_with_dart_keyword_field_twin_sync(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSyncSse + dco_decode_struct_with_dart_keyword_field_twin_sync_sse(dynamic raw); + @protected StructWithEnumTwinNormal dco_decode_struct_with_enum_twin_normal(dynamic raw); @@ -9226,6 +9308,30 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_struct_with_explicit_auto_opaque_field_twin_sync_sse_moi( dynamic raw); + @protected + StructWithFieldRenameTwinNormal + dco_decode_struct_with_field_rename_twin_normal(dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_struct_with_field_rename_twin_rust_async(dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsyncSse + dco_decode_struct_with_field_rename_twin_rust_async_sse(dynamic raw); + + @protected + StructWithFieldRenameTwinSse dco_decode_struct_with_field_rename_twin_sse( + dynamic raw); + + @protected + StructWithFieldRenameTwinSync dco_decode_struct_with_field_rename_twin_sync( + dynamic raw); + + @protected + StructWithFieldRenameTwinSyncSse + dco_decode_struct_with_field_rename_twin_sync_sse(dynamic raw); + @protected StructWithGoodAndOpaqueFieldTwinMoi dco_decode_struct_with_good_and_opaque_field_twin_moi(dynamic raw); @@ -14326,6 +14432,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_struct_with_custom_name_method_twin_normal( SseDeserializer deserializer); + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async_sse( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSse + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sse( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSyncSse + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync_sse( + SseDeserializer deserializer); + @protected StructWithEnumTwinNormal sse_decode_box_autoadd_struct_with_enum_twin_normal( SseDeserializer deserializer); @@ -14413,6 +14549,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync_sse_moi( SseDeserializer deserializer); + @protected + StructWithFieldRenameTwinNormal + sse_decode_box_autoadd_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsyncSse + sse_decode_box_autoadd_struct_with_field_rename_twin_rust_async_sse( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSse + sse_decode_box_autoadd_struct_with_field_rename_twin_sse( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSync + sse_decode_box_autoadd_struct_with_field_rename_twin_sync( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSyncSse + sse_decode_box_autoadd_struct_with_field_rename_twin_sync_sse( + SseDeserializer deserializer); + @protected StructWithGoodAndOpaqueFieldTwinMoi sse_decode_box_autoadd_struct_with_good_and_opaque_field_twin_moi( @@ -18389,6 +18555,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_struct_with_custom_name_method_twin_normal( SseDeserializer deserializer); + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsyncSse + sse_decode_struct_with_dart_keyword_field_twin_rust_async_sse( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSse + sse_decode_struct_with_dart_keyword_field_twin_sse( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSyncSse + sse_decode_struct_with_dart_keyword_field_twin_sync_sse( + SseDeserializer deserializer); + @protected StructWithEnumTwinNormal sse_decode_struct_with_enum_twin_normal( SseDeserializer deserializer); @@ -18474,6 +18670,34 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_struct_with_explicit_auto_opaque_field_twin_sync_sse_moi( SseDeserializer deserializer); + @protected + StructWithFieldRenameTwinNormal + sse_decode_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsyncSse + sse_decode_struct_with_field_rename_twin_rust_async_sse( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSse sse_decode_struct_with_field_rename_twin_sse( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSync sse_decode_struct_with_field_rename_twin_sync( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSyncSse + sse_decode_struct_with_field_rename_twin_sync_sse( + SseDeserializer deserializer); + @protected StructWithGoodAndOpaqueFieldTwinMoi sse_decode_struct_with_good_and_opaque_field_twin_moi( @@ -21531,6 +21755,29 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return cst_encode_struct_with_custom_name_method_twin_normal(raw); } + @protected + List + cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_struct_with_dart_keyword_field_twin_normal(raw); + } + + @protected + List + cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_struct_with_dart_keyword_field_twin_rust_async(raw); + } + + @protected + List cst_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_struct_with_dart_keyword_field_twin_sync(raw); + } + @protected List cst_encode_box_autoadd_struct_with_enum_twin_normal( StructWithEnumTwinNormal raw) { @@ -21602,6 +21849,27 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return cst_encode_struct_with_explicit_auto_opaque_field_twin_sync_moi(raw); } + @protected + List cst_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_struct_with_field_rename_twin_normal(raw); + } + + @protected + List cst_encode_box_autoadd_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_struct_with_field_rename_twin_rust_async(raw); + } + + @protected + List cst_encode_box_autoadd_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_struct_with_field_rename_twin_sync(raw); + } + @protected List cst_encode_box_autoadd_struct_with_good_and_opaque_field_twin_moi( @@ -24586,7 +24854,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return [ cst_encode_String(raw.regular), cst_encode_String(raw.type), - cst_encode_bool(raw.async), + cst_encode_bool(raw.async_), cst_encode_String(raw.another) ]; } @@ -24598,7 +24866,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return [ cst_encode_String(raw.regular), cst_encode_String(raw.type), - cst_encode_bool(raw.async), + cst_encode_bool(raw.async_), cst_encode_String(raw.another) ]; } @@ -24610,7 +24878,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return [ cst_encode_String(raw.regular), cst_encode_String(raw.type), - cst_encode_bool(raw.async), + cst_encode_bool(raw.async_), cst_encode_String(raw.another) ]; } @@ -26289,6 +26557,27 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return [cst_encode_i_32(raw.field0)]; } + @protected + List cst_encode_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_i_32(raw.class_), cst_encode_i_64(raw.interface_)]; + } + + @protected + List cst_encode_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_i_32(raw.class_), cst_encode_i_64(raw.interface_)]; + } + + @protected + List cst_encode_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_i_32(raw.class_), cst_encode_i_64(raw.interface_)]; + } + @protected List cst_encode_struct_with_enum_twin_normal( StructWithEnumTwinNormal raw) { @@ -26387,6 +26676,27 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { ]; } + @protected + List cst_encode_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_i_32(raw.renamed_field)]; + } + + @protected + List cst_encode_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_i_32(raw.renamed_field)]; + } + + @protected + List cst_encode_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_i_32(raw.renamed_field)]; + } + @protected List cst_encode_struct_with_good_and_opaque_field_twin_moi( StructWithGoodAndOpaqueFieldTwinMoi raw) { @@ -32801,6 +33111,32 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_struct_with_custom_name_method_twin_normal( StructWithCustomNameMethodTwinNormal self, SseSerializer serializer); + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async_sse( + StructWithDartKeywordFieldTwinRustAsyncSse self, + SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sse( + StructWithDartKeywordFieldTwinSse self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync_sse( + StructWithDartKeywordFieldTwinSyncSse self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer); @@ -32891,6 +33227,30 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithExplicitAutoOpaqueFieldTwinSyncSseMoi self, SseSerializer serializer); + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_rust_async_sse( + StructWithFieldRenameTwinRustAsyncSse self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sse( + StructWithFieldRenameTwinSse self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sync_sse( + StructWithFieldRenameTwinSyncSse self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_good_and_opaque_field_twin_moi( StructWithGoodAndOpaqueFieldTwinMoi self, SseSerializer serializer); @@ -36677,6 +37037,31 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_struct_with_custom_name_method_twin_normal( StructWithCustomNameMethodTwinNormal self, SseSerializer serializer); + @protected + void sse_encode_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_rust_async_sse( + StructWithDartKeywordFieldTwinRustAsyncSse self, + SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sse( + StructWithDartKeywordFieldTwinSse self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sync_sse( + StructWithDartKeywordFieldTwinSyncSse self, SseSerializer serializer); + @protected void sse_encode_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer); @@ -36759,6 +37144,30 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithExplicitAutoOpaqueFieldTwinSyncSseMoi self, SseSerializer serializer); + @protected + void sse_encode_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_rust_async_sse( + StructWithFieldRenameTwinRustAsyncSse self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_sse( + StructWithFieldRenameTwinSse self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_sync_sse( + StructWithFieldRenameTwinSyncSse self, SseSerializer serializer); + @protected void sse_encode_struct_with_good_and_opaque_field_twin_moi( StructWithGoodAndOpaqueFieldTwinMoi self, SseSerializer serializer); @@ -56379,6 +56788,18 @@ class RustLibWire implements BaseWire { .wire__crate__api__pseudo_manual__stream_twin_sse__stream_sink_inside_vec_twin_sse( port_, ptr_, rust_vec_len_, data_len_); + void wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async( + NativePortType port_, List arg) => + wasmModule + .wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async( + port_, arg); + + void wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async( + NativePortType port_, List arg) => + wasmModule + .wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async( + port_, arg); + void wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_one_field_twin_rust_async( NativePortType port_, List arg) => wasmModule @@ -56409,6 +56830,24 @@ class RustLibWire implements BaseWire { .wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct_with_two_field_twin_rust_async( port_, arg); + void wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse( + NativePortType port_, + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_) => + wasmModule + .wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse( + port_, ptr_, rust_vec_len_, data_len_); + + void wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse( + NativePortType port_, + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_) => + wasmModule + .wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse( + port_, ptr_, rust_vec_len_, data_len_); + void wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_struct_with_one_field_twin_rust_async_sse( NativePortType port_, PlatformGeneralizedUint8ListPtr ptr_, @@ -56454,6 +56893,24 @@ class RustLibWire implements BaseWire { .wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_tuple_struct_with_two_field_twin_rust_async_sse( port_, ptr_, rust_vec_len_, data_len_); + void wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse( + NativePortType port_, + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_) => + wasmModule + .wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse( + port_, ptr_, rust_vec_len_, data_len_); + + void wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse( + NativePortType port_, + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_) => + wasmModule + .wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse( + port_, ptr_, rust_vec_len_, data_len_); + void wire__crate__api__pseudo_manual__structure_twin_sse__func_struct_with_one_field_twin_sse( NativePortType port_, PlatformGeneralizedUint8ListPtr ptr_, @@ -56499,6 +56956,20 @@ class RustLibWire implements BaseWire { .wire__crate__api__pseudo_manual__structure_twin_sse__func_tuple_struct_with_two_field_twin_sse( port_, ptr_, rust_vec_len_, data_len_); + dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync( + List arg) => + wasmModule + .wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync( + arg); + + dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync( + List arg) => + wasmModule + .wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync( + arg); + dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_one_field_twin_sync( List arg) => @@ -56534,6 +57005,24 @@ class RustLibWire implements BaseWire { .wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_two_field_twin_sync( arg); + dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartSse */ + wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse( + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_) => + wasmModule + .wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse( + ptr_, rust_vec_len_, data_len_); + + dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartSse */ + wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse( + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_) => + wasmModule + .wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse( + ptr_, rust_vec_len_, data_len_); + dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartSse */ wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_struct_with_one_field_twin_sync_sse( PlatformGeneralizedUint8ListPtr ptr_, @@ -57356,6 +57845,18 @@ class RustLibWire implements BaseWire { .wire__crate__api__stream_misc__stream_sink_dart_async_twin_normal( port_, sink); + void wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal( + NativePortType port_, List arg) => + wasmModule + .wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal( + port_, arg); + + void wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal( + NativePortType port_, List arg) => + wasmModule + .wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal( + port_, arg); + void wire__crate__api__structure__func_struct_with_one_field_twin_normal( NativePortType port_, List arg) => wasmModule @@ -73156,6 +73657,14 @@ class RustLibWasmModule { int rust_vec_len_, int data_len_); + external void + wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async( + NativePortType port_, List arg); + + external void + wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async( + NativePortType port_, List arg); + external void wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_one_field_twin_rust_async( NativePortType port_, List arg); @@ -73176,6 +73685,20 @@ class RustLibWasmModule { wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct_with_two_field_twin_rust_async( NativePortType port_, List arg); + external void + wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse( + NativePortType port_, + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_); + + external void + wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse( + NativePortType port_, + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_); + external void wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_struct_with_one_field_twin_rust_async_sse( NativePortType port_, @@ -73211,6 +73734,20 @@ class RustLibWasmModule { int rust_vec_len_, int data_len_); + external void + wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse( + NativePortType port_, + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_); + + external void + wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse( + NativePortType port_, + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_); + external void wire__crate__api__pseudo_manual__structure_twin_sse__func_struct_with_one_field_twin_sse( NativePortType port_, @@ -73246,6 +73783,14 @@ class RustLibWasmModule { int rust_vec_len_, int data_len_); + external dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync( + List arg); + + external dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync( + List arg); + external dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_one_field_twin_sync( List arg); @@ -73266,6 +73811,18 @@ class RustLibWasmModule { wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_two_field_twin_sync( List arg); + external dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartSse */ + wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse( + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_); + + external dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartSse */ + wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse( + PlatformGeneralizedUint8ListPtr ptr_, + int rust_vec_len_, + int data_len_); + external dynamic /* flutter_rust_bridge::for_generated::WireSyncRust2DartSse */ wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_struct_with_one_field_twin_sync_sse( PlatformGeneralizedUint8ListPtr ptr_, @@ -73814,6 +74371,14 @@ class RustLibWasmModule { wire__crate__api__stream_misc__stream_sink_dart_async_twin_normal( NativePortType port_, String sink); + external void + wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal( + NativePortType port_, List arg); + + external void + wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal( + NativePortType port_, List arg); + external void wire__crate__api__structure__func_struct_with_one_field_twin_normal( NativePortType port_, List arg); diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_rust_async.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_rust_async.rs index 05e344088b..64998973ae 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_rust_async.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_rust_async.rs @@ -2,6 +2,8 @@ // and is auto-generated from `structure.rs` by frb_internal // Please do not modify manually, but modify the origin and re-run frb_internal generator +use flutter_rust_bridge::frb; + pub struct StructWithZeroFieldTwinRustAsync {} pub async fn func_struct_with_zero_field_twin_rust_async( @@ -46,3 +48,26 @@ pub async fn func_tuple_struct_with_two_field_twin_rust_async( ) -> TupleStructWithTwoFieldTwinRustAsync { arg } + +#[frb] +pub struct StructWithFieldRenameTwinRustAsync { + #[frb(name = "renamed_field")] + pub class: i32, +} + +pub async fn func_for_struct_with_field_rename_twin_rust_async( + arg: StructWithFieldRenameTwinRustAsync, +) -> StructWithFieldRenameTwinRustAsync { + arg +} + +pub struct StructWithDartKeywordFieldTwinRustAsync { + pub class: i32, + pub interface: i64, +} + +pub async fn func_for_struct_with_dart_keyword_field_twin_rust_async( + arg: StructWithDartKeywordFieldTwinRustAsync, +) -> StructWithDartKeywordFieldTwinRustAsync { + arg +} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_rust_async_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_rust_async_sse.rs index 43f4e574f9..60fc5db02d 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_rust_async_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_rust_async_sse.rs @@ -2,6 +2,8 @@ // and is auto-generated from `structure.rs` by frb_internal // Please do not modify manually, but modify the origin and re-run frb_internal generator +use flutter_rust_bridge::frb; + pub struct StructWithZeroFieldTwinRustAsyncSse {} #[flutter_rust_bridge::frb(serialize)] @@ -51,3 +53,28 @@ pub async fn func_tuple_struct_with_two_field_twin_rust_async_sse( ) -> TupleStructWithTwoFieldTwinRustAsyncSse { arg } + +#[frb] +pub struct StructWithFieldRenameTwinRustAsyncSse { + #[frb(name = "renamed_field")] + pub class: i32, +} + +#[flutter_rust_bridge::frb(serialize)] +pub async fn func_for_struct_with_field_rename_twin_rust_async_sse( + arg: StructWithFieldRenameTwinRustAsyncSse, +) -> StructWithFieldRenameTwinRustAsyncSse { + arg +} + +pub struct StructWithDartKeywordFieldTwinRustAsyncSse { + pub class: i32, + pub interface: i64, +} + +#[flutter_rust_bridge::frb(serialize)] +pub async fn func_for_struct_with_dart_keyword_field_twin_rust_async_sse( + arg: StructWithDartKeywordFieldTwinRustAsyncSse, +) -> StructWithDartKeywordFieldTwinRustAsyncSse { + arg +} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sse.rs index da5b308543..9f6f0ed96e 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sse.rs @@ -2,6 +2,8 @@ // and is auto-generated from `structure.rs` by frb_internal // Please do not modify manually, but modify the origin and re-run frb_internal generator +use flutter_rust_bridge::frb; + pub struct StructWithZeroFieldTwinSse {} #[flutter_rust_bridge::frb(serialize)] @@ -51,3 +53,28 @@ pub fn func_tuple_struct_with_two_field_twin_sse( ) -> TupleStructWithTwoFieldTwinSse { arg } + +#[frb] +pub struct StructWithFieldRenameTwinSse { + #[frb(name = "renamed_field")] + pub class: i32, +} + +#[flutter_rust_bridge::frb(serialize)] +pub fn func_for_struct_with_field_rename_twin_sse( + arg: StructWithFieldRenameTwinSse, +) -> StructWithFieldRenameTwinSse { + arg +} + +pub struct StructWithDartKeywordFieldTwinSse { + pub class: i32, + pub interface: i64, +} + +#[flutter_rust_bridge::frb(serialize)] +pub fn func_for_struct_with_dart_keyword_field_twin_sse( + arg: StructWithDartKeywordFieldTwinSse, +) -> StructWithDartKeywordFieldTwinSse { + arg +} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sync.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sync.rs index ec1d3294cf..8b6392b339 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sync.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sync.rs @@ -2,6 +2,8 @@ // and is auto-generated from `structure.rs` by frb_internal // Please do not modify manually, but modify the origin and re-run frb_internal generator +use flutter_rust_bridge::frb; + pub struct StructWithZeroFieldTwinSync {} #[flutter_rust_bridge::frb(sync)] @@ -51,3 +53,28 @@ pub fn func_tuple_struct_with_two_field_twin_sync( ) -> TupleStructWithTwoFieldTwinSync { arg } + +#[frb] +pub struct StructWithFieldRenameTwinSync { + #[frb(name = "renamed_field")] + pub class: i32, +} + +#[flutter_rust_bridge::frb(sync)] +pub fn func_for_struct_with_field_rename_twin_sync( + arg: StructWithFieldRenameTwinSync, +) -> StructWithFieldRenameTwinSync { + arg +} + +pub struct StructWithDartKeywordFieldTwinSync { + pub class: i32, + pub interface: i64, +} + +#[flutter_rust_bridge::frb(sync)] +pub fn func_for_struct_with_dart_keyword_field_twin_sync( + arg: StructWithDartKeywordFieldTwinSync, +) -> StructWithDartKeywordFieldTwinSync { + arg +} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sync_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sync_sse.rs index 95222ee934..378453829b 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sync_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/structure_twin_sync_sse.rs @@ -2,6 +2,8 @@ // and is auto-generated from `structure.rs` by frb_internal // Please do not modify manually, but modify the origin and re-run frb_internal generator +use flutter_rust_bridge::frb; + pub struct StructWithZeroFieldTwinSyncSse {} #[flutter_rust_bridge::frb(serialize)] @@ -56,3 +58,30 @@ pub fn func_tuple_struct_with_two_field_twin_sync_sse( ) -> TupleStructWithTwoFieldTwinSyncSse { arg } + +#[frb] +pub struct StructWithFieldRenameTwinSyncSse { + #[frb(name = "renamed_field")] + pub class: i32, +} + +#[flutter_rust_bridge::frb(serialize)] +#[flutter_rust_bridge::frb(sync)] +pub fn func_for_struct_with_field_rename_twin_sync_sse( + arg: StructWithFieldRenameTwinSyncSse, +) -> StructWithFieldRenameTwinSyncSse { + arg +} + +pub struct StructWithDartKeywordFieldTwinSyncSse { + pub class: i32, + pub interface: i64, +} + +#[flutter_rust_bridge::frb(serialize)] +#[flutter_rust_bridge::frb(sync)] +pub fn func_for_struct_with_dart_keyword_field_twin_sync_sse( + arg: StructWithDartKeywordFieldTwinSyncSse, +) -> StructWithDartKeywordFieldTwinSyncSse { + arg +} diff --git a/frb_example/pure_dart/rust/src/frb_generated.io.rs b/frb_example/pure_dart/rust/src/frb_generated.io.rs index 5b84a10fdc..d1e6b5e14d 100644 --- a/frb_example/pure_dart/rust/src/frb_generated.io.rs +++ b/frb_example/pure_dart/rust/src/frb_generated.io.rs @@ -6269,6 +6269,37 @@ impl CstDecode::cst_decode(*wrap).into() } } +impl CstDecode + for *mut wire_cst_struct_with_dart_keyword_field_twin_normal +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::structure::StructWithDartKeywordFieldTwinNormal { + 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_dart_keyword_field_twin_rust_async { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + 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_dart_keyword_field_twin_sync +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::< + crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync, + >::cst_decode(*wrap) + .into() + } +} impl CstDecode for *mut wire_cst_struct_with_enum_twin_normal { @@ -6349,6 +6380,41 @@ impl CstDecode::cst_decode(*wrap).into() } } +impl CstDecode + for *mut wire_cst_struct_with_field_rename_twin_normal +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::structure::StructWithFieldRenameTwinNormal { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap) + .into() + } +} +impl + CstDecode< + crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync, + > for *mut wire_cst_struct_with_field_rename_twin_rust_async +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync + { + 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_field_rename_twin_sync +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} impl CstDecode< crate::api::pseudo_manual::rust_auto_opaque_twin_moi::StructWithGoodAndOpaqueFieldTwinMoi, @@ -12016,6 +12082,36 @@ impl CstDecode + for wire_cst_struct_with_dart_keyword_field_twin_normal +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::structure::StructWithDartKeywordFieldTwinNormal { + crate::api::structure::StructWithDartKeywordFieldTwinNormal { + class: self.class.cst_decode(), + interface: self.interface.cst_decode(), + } + } +} +impl CstDecode for wire_cst_struct_with_dart_keyword_field_twin_rust_async { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync{class: self.class.cst_decode(),interface: self.interface.cst_decode()} + } + } +impl CstDecode + for wire_cst_struct_with_dart_keyword_field_twin_sync +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync { + crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync { + class: self.class.cst_decode(), + interface: self.interface.cst_decode(), + } + } +} impl CstDecode for wire_cst_struct_with_enum_twin_normal { @@ -12096,6 +12192,43 @@ impl CstDecode + for wire_cst_struct_with_field_rename_twin_normal +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::structure::StructWithFieldRenameTwinNormal { + crate::api::structure::StructWithFieldRenameTwinNormal { + class: self.class.cst_decode(), + } + } +} +impl + CstDecode< + crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync, + > for wire_cst_struct_with_field_rename_twin_rust_async +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync + { + crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync { + class: self.class.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_struct_with_field_rename_twin_sync +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + class: self.class.cst_decode(), + } + } +} impl CstDecode< crate::api::pseudo_manual::rust_auto_opaque_twin_moi::StructWithGoodAndOpaqueFieldTwinMoi, @@ -16190,6 +16323,45 @@ impl Default for wire_cst_struct_with_custom_name_method_twin_normal { Self::new_with_null_ptr() } } +impl NewWithNullPtr for wire_cst_struct_with_dart_keyword_field_twin_normal { + fn new_with_null_ptr() -> Self { + Self { + class: Default::default(), + interface: Default::default(), + } + } +} +impl Default for wire_cst_struct_with_dart_keyword_field_twin_normal { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_struct_with_dart_keyword_field_twin_rust_async { + fn new_with_null_ptr() -> Self { + Self { + class: Default::default(), + interface: Default::default(), + } + } +} +impl Default for wire_cst_struct_with_dart_keyword_field_twin_rust_async { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_struct_with_dart_keyword_field_twin_sync { + fn new_with_null_ptr() -> Self { + Self { + class: Default::default(), + interface: Default::default(), + } + } +} +impl Default for wire_cst_struct_with_dart_keyword_field_twin_sync { + fn default() -> Self { + Self::new_with_null_ptr() + } +} impl NewWithNullPtr for wire_cst_struct_with_enum_twin_normal { fn new_with_null_ptr() -> Self { Self { @@ -16307,6 +16479,42 @@ impl Default for wire_cst_struct_with_explicit_auto_opaque_field_twin_sync_moi { Self::new_with_null_ptr() } } +impl NewWithNullPtr for wire_cst_struct_with_field_rename_twin_normal { + fn new_with_null_ptr() -> Self { + Self { + class: Default::default(), + } + } +} +impl Default for wire_cst_struct_with_field_rename_twin_normal { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_struct_with_field_rename_twin_rust_async { + fn new_with_null_ptr() -> Self { + Self { + class: Default::default(), + } + } +} +impl Default for wire_cst_struct_with_field_rename_twin_rust_async { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_struct_with_field_rename_twin_sync { + fn new_with_null_ptr() -> Self { + Self { + class: Default::default(), + } + } +} +impl Default for wire_cst_struct_with_field_rename_twin_sync { + fn default() -> Self { + Self::new_with_null_ptr() + } +} impl NewWithNullPtr for wire_cst_struct_with_good_and_opaque_field_twin_moi { fn new_with_null_ptr() -> Self { Self { @@ -40859,6 +41067,22 @@ pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__ ) } +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async( + port_: i64, + arg: *mut wire_cst_struct_with_dart_keyword_field_twin_rust_async, +) { + wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async_impl(port_, arg) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async( + port_: i64, + arg: *mut wire_cst_struct_with_field_rename_twin_rust_async, +) { + wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async_impl(port_, arg) +} + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_one_field_twin_rust_async( port_: i64, @@ -40899,6 +41123,26 @@ pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__ wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct_with_two_field_twin_rust_async_impl(port_, arg) } +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse( + port_: i64, + ptr_: *mut u8, + rust_vec_len_: i32, + data_len_: i32, +) { + wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse_impl(port_, ptr_, rust_vec_len_, data_len_) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse( + port_: i64, + ptr_: *mut u8, + rust_vec_len_: i32, + data_len_: i32, +) { + wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse_impl(port_, ptr_, rust_vec_len_, data_len_) +} + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_struct_with_one_field_twin_rust_async_sse( port_: i64, @@ -40949,6 +41193,26 @@ pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__ wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_tuple_struct_with_two_field_twin_rust_async_sse_impl(port_, ptr_, rust_vec_len_, data_len_) } +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse( + port_: i64, + ptr_: *mut u8, + rust_vec_len_: i32, + data_len_: i32, +) { + wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse_impl(port_, ptr_, rust_vec_len_, data_len_) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse( + port_: i64, + ptr_: *mut u8, + rust_vec_len_: i32, + data_len_: i32, +) { + wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse_impl(port_, ptr_, rust_vec_len_, data_len_) +} + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sse__func_struct_with_one_field_twin_sse( port_: i64, @@ -41014,6 +41278,20 @@ pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__ wire__crate__api__pseudo_manual__structure_twin_sse__func_tuple_struct_with_two_field_twin_sse_impl(port_, ptr_, rust_vec_len_, data_len_) } +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync( + arg: *mut wire_cst_struct_with_dart_keyword_field_twin_sync, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync_impl(arg) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync( + arg: *mut wire_cst_struct_with_field_rename_twin_sync, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync_impl(arg) +} + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_one_field_twin_sync( arg: *mut wire_cst_struct_with_one_field_twin_sync, @@ -41055,6 +41333,24 @@ pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__ wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_two_field_twin_sync_impl(arg) } +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse( + ptr_: *mut u8, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse_impl(ptr_, rust_vec_len_, data_len_) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse( + ptr_: *mut u8, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse_impl(ptr_, rust_vec_len_, data_len_) +} + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_struct_with_one_field_twin_sync_sse( ptr_: *mut u8, @@ -42196,6 +42492,24 @@ pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__stream_misc__st wire__crate__api__stream_misc__stream_sink_dart_async_twin_normal_impl(port_, sink) } +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal( + port_: i64, + arg: *mut wire_cst_struct_with_dart_keyword_field_twin_normal, +) { + wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal_impl( + port_, arg, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal( + port_: i64, + arg: *mut wire_cst_struct_with_field_rename_twin_normal, +) { + wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal_impl(port_, arg) +} + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_wire__crate__api__structure__func_struct_with_one_field_twin_normal( port_: i64, @@ -47555,6 +47869,30 @@ pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_c ) } +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_normal( +) -> *mut wire_cst_struct_with_dart_keyword_field_twin_normal { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_struct_with_dart_keyword_field_twin_normal::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( +) -> *mut wire_cst_struct_with_dart_keyword_field_twin_rust_async { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_struct_with_dart_keyword_field_twin_rust_async::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_dart_keyword_field_twin_sync( +) -> *mut wire_cst_struct_with_dart_keyword_field_twin_sync { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_struct_with_dart_keyword_field_twin_sync::new_with_null_ptr(), + ) +} + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_enum_twin_normal( ) -> *mut wire_cst_struct_with_enum_twin_normal { @@ -47627,6 +47965,30 @@ pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_e ) } +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_normal( +) -> *mut wire_cst_struct_with_field_rename_twin_normal { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_struct_with_field_rename_twin_normal::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_rust_async( +) -> *mut wire_cst_struct_with_field_rename_twin_rust_async { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_struct_with_field_rename_twin_rust_async::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_field_rename_twin_sync( +) -> *mut wire_cst_struct_with_field_rename_twin_sync { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_struct_with_field_rename_twin_sync::new_with_null_ptr(), + ) +} + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_struct_with_good_and_opaque_field_twin_moi( ) -> *mut wire_cst_struct_with_good_and_opaque_field_twin_moi { @@ -53571,6 +53933,24 @@ pub struct wire_cst_struct_with_custom_name_method_twin_normal { } #[repr(C)] #[derive(Clone, Copy)] +pub struct wire_cst_struct_with_dart_keyword_field_twin_normal { + class: i32, + interface: i64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_struct_with_dart_keyword_field_twin_rust_async { + class: i32, + interface: i64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_struct_with_dart_keyword_field_twin_sync { + class: i32, + interface: i64, +} +#[repr(C)] +#[derive(Clone, Copy)] pub struct wire_cst_struct_with_enum_twin_normal { abc1: wire_cst_abc_twin_normal, abc2: wire_cst_abc_twin_normal, @@ -53625,6 +54005,21 @@ pub struct wire_cst_struct_with_explicit_auto_opaque_field_twin_sync_moi { } #[repr(C)] #[derive(Clone, Copy)] +pub struct wire_cst_struct_with_field_rename_twin_normal { + class: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_struct_with_field_rename_twin_rust_async { + class: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_struct_with_field_rename_twin_sync { + class: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] pub struct wire_cst_struct_with_good_and_opaque_field_twin_moi { good: *mut wire_cst_list_prim_u_8_strict, opaque: usize, diff --git a/frb_example/pure_dart/rust/src/frb_generated.rs b/frb_example/pure_dart/rust/src/frb_generated.rs index c0f7189695..17ce23705b 100644 --- a/frb_example/pure_dart/rust/src/frb_generated.rs +++ b/frb_example/pure_dart/rust/src/frb_generated.rs @@ -90,7 +90,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_auto_opaque = RustAutoOpaqueNom, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.38"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 116563282; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -2031266698; // Section: executor @@ -41689,6 +41689,28 @@ fn wire__crate__api__pseudo_manual__stream_twin_sse__stream_sink_inside_vec_twin }, ) } +fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_dart_keyword_field_twin_rust_async", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_arg = arg.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_rust_async::func_for_struct_with_dart_keyword_field_twin_rust_async(api_arg).await) + })().await) + } }) +} +fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: impl CstDecode< + crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_field_rename_twin_rust_async", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_arg = arg.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_rust_async::func_for_struct_with_field_rename_twin_rust_async(api_arg).await) + })().await) + } }) +} fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_one_field_twin_rust_async_impl( port_: flutter_rust_bridge::for_generated::MessagePort, arg: impl CstDecode< @@ -41749,6 +41771,36 @@ fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct })().await) } }) } +fn wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_dart_keyword_field_twin_rust_async_sse", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { + let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode(&mut deserializer);deserializer.end(); move |context| async move { + transform_result_sse((move || async move { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_rust_async_sse::func_for_struct_with_dart_keyword_field_twin_rust_async_sse(api_arg).await) + })().await) + } }) +} +fn wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_field_rename_twin_rust_async_sse", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { + let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode(&mut deserializer);deserializer.end(); move |context| async move { + transform_result_sse((move || async move { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_rust_async_sse::func_for_struct_with_field_rename_twin_rust_async_sse(api_arg).await) + })().await) + } }) +} fn wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_struct_with_one_field_twin_rust_async_sse_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, @@ -41824,6 +41876,36 @@ fn wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_tuple_st })().await) } }) } +fn wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_dart_keyword_field_twin_sse", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { + let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode(&mut deserializer);deserializer.end(); move |context| { + transform_result_sse((move || { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_sse::func_for_struct_with_dart_keyword_field_twin_sse(api_arg)) + })()) + } }) +} +fn wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_field_rename_twin_sse", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { + let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode(&mut deserializer);deserializer.end(); move |context| { + transform_result_sse((move || { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_sse::func_for_struct_with_field_rename_twin_sse(api_arg)) + })()) + } }) +} fn wire__crate__api__pseudo_manual__structure_twin_sse__func_struct_with_one_field_twin_sse_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, @@ -41899,6 +41981,24 @@ fn wire__crate__api__pseudo_manual__structure_twin_sse__func_tuple_struct_with_t })()) } }) } +fn wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync_impl( + arg: impl CstDecode< + crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync, + >, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_dart_keyword_field_twin_sync", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { let api_arg = arg.cst_decode(); + transform_result_dco((move || { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_sync::func_for_struct_with_dart_keyword_field_twin_sync(api_arg)) + })()) }) +} +fn wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync_impl( + arg: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_field_rename_twin_sync", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { let api_arg = arg.cst_decode(); + transform_result_dco((move || { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_sync::func_for_struct_with_field_rename_twin_sync(api_arg)) + })()) }) +} fn wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_one_field_twin_sync_impl( arg: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { @@ -41939,6 +42039,32 @@ fn wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_ Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_sync::func_tuple_struct_with_two_field_twin_sync(api_arg)) })()) }) } +fn wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_dart_keyword_field_twin_sync_sse", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { + let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode(&mut deserializer);deserializer.end(); + transform_result_sse((move || { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_sync_sse::func_for_struct_with_dart_keyword_field_twin_sync_sse(api_arg)) + })()) }) +} +fn wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_field_rename_twin_sync_sse", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { + let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode(&mut deserializer);deserializer.end(); + transform_result_sse((move || { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_sync_sse::func_for_struct_with_field_rename_twin_sync_sse(api_arg)) + })()) }) +} fn wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_struct_with_one_field_twin_sync_sse_impl( ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -44459,6 +44585,54 @@ fn wire__crate__api__stream_misc__stream_sink_dart_async_twin_normal_impl( }, ) } +fn wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "func_for_struct_with_dart_keyword_field_twin_normal", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_arg = arg.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok( + crate::api::structure::func_for_struct_with_dart_keyword_field_twin_normal( + api_arg, + ), + ) + })()) + } + }, + ) +} +fn wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "func_for_struct_with_field_rename_twin_normal", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_arg = arg.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok( + crate::api::structure::func_for_struct_with_field_rename_twin_normal( + api_arg, + ), + ) + })()) + } + }, + ) +} fn wire__crate__api__structure__func_struct_with_one_field_twin_normal_impl( port_: flutter_rust_bridge::for_generated::MessagePort, arg: impl CstDecode, @@ -60293,12 +60467,12 @@ impl SseDecode for crate::api::raw_string::MoreThanJustOneRawStringStructTwinNor fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_regular = ::sse_decode(deserializer); let mut var_type = ::sse_decode(deserializer); - let mut var_async = ::sse_decode(deserializer); + let mut var_async_ = ::sse_decode(deserializer); let mut var_another = ::sse_decode(deserializer); return crate::api::raw_string::MoreThanJustOneRawStringStructTwinNormal { regular: var_regular, r#type: var_type, - r#async: var_async, + r#async: var_async_, another: var_another, }; } @@ -60308,18 +60482,18 @@ impl SseDecode for crate::api::pseudo_manual::raw_string_twin_rust_async::MoreTh // 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_regular = ::sse_decode(deserializer); let mut var_type = ::sse_decode(deserializer); -let mut var_async = ::sse_decode(deserializer); +let mut var_async_ = ::sse_decode(deserializer); let mut var_another = ::sse_decode(deserializer); -return crate::api::pseudo_manual::raw_string_twin_rust_async::MoreThanJustOneRawStringStructTwinRustAsync{regular: var_regular, r#type: var_type, r#async: var_async, another: var_another};} +return crate::api::pseudo_manual::raw_string_twin_rust_async::MoreThanJustOneRawStringStructTwinRustAsync{regular: var_regular, r#type: var_type, r#async: var_async_, another: var_another};} } impl SseDecode for crate::api::pseudo_manual::raw_string_twin_rust_async_sse::MoreThanJustOneRawStringStructTwinRustAsyncSse { // 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_regular = ::sse_decode(deserializer); let mut var_type = ::sse_decode(deserializer); -let mut var_async = ::sse_decode(deserializer); +let mut var_async_ = ::sse_decode(deserializer); let mut var_another = ::sse_decode(deserializer); -return crate::api::pseudo_manual::raw_string_twin_rust_async_sse::MoreThanJustOneRawStringStructTwinRustAsyncSse{regular: var_regular, r#type: var_type, r#async: var_async, another: var_another};} +return crate::api::pseudo_manual::raw_string_twin_rust_async_sse::MoreThanJustOneRawStringStructTwinRustAsyncSse{regular: var_regular, r#type: var_type, r#async: var_async_, another: var_another};} } impl SseDecode @@ -60329,9 +60503,9 @@ impl SseDecode fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_regular = ::sse_decode(deserializer); let mut var_type = ::sse_decode(deserializer); - let mut var_async = ::sse_decode(deserializer); + let mut var_async_ = ::sse_decode(deserializer); let mut var_another = ::sse_decode(deserializer); - return crate::api::pseudo_manual::raw_string_twin_sse::MoreThanJustOneRawStringStructTwinSse{regular: var_regular, r#type: var_type, r#async: var_async, another: var_another}; + return crate::api::pseudo_manual::raw_string_twin_sse::MoreThanJustOneRawStringStructTwinSse{regular: var_regular, r#type: var_type, r#async: var_async_, another: var_another}; } } @@ -60342,9 +60516,9 @@ impl SseDecode fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_regular = ::sse_decode(deserializer); let mut var_type = ::sse_decode(deserializer); - let mut var_async = ::sse_decode(deserializer); + let mut var_async_ = ::sse_decode(deserializer); let mut var_another = ::sse_decode(deserializer); - return crate::api::pseudo_manual::raw_string_twin_sync::MoreThanJustOneRawStringStructTwinSync{regular: var_regular, r#type: var_type, r#async: var_async, another: var_another}; + return crate::api::pseudo_manual::raw_string_twin_sync::MoreThanJustOneRawStringStructTwinSync{regular: var_regular, r#type: var_type, r#async: var_async_, another: var_another}; } } @@ -60352,9 +60526,9 @@ impl SseDecode for crate::api::pseudo_manual::raw_string_twin_sync_sse::MoreThan // 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_regular = ::sse_decode(deserializer); let mut var_type = ::sse_decode(deserializer); -let mut var_async = ::sse_decode(deserializer); +let mut var_async_ = ::sse_decode(deserializer); let mut var_another = ::sse_decode(deserializer); -return crate::api::pseudo_manual::raw_string_twin_sync_sse::MoreThanJustOneRawStringStructTwinSyncSse{regular: var_regular, r#type: var_type, r#async: var_async, another: var_another};} +return crate::api::pseudo_manual::raw_string_twin_sync_sse::MoreThanJustOneRawStringStructTwinSyncSse{regular: var_regular, r#type: var_type, r#async: var_async_, another: var_another};} } impl SseDecode for crate::api::method::MyCallableTwinNormal { @@ -64709,6 +64883,68 @@ impl SseDecode for crate::api::misc_no_twin_example_a::StructWithCustomNameMetho } } +impl SseDecode for crate::api::structure::StructWithDartKeywordFieldTwinNormal { + // 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_class_ = ::sse_decode(deserializer); + let mut var_interface_ = ::sse_decode(deserializer); + return crate::api::structure::StructWithDartKeywordFieldTwinNormal { + class: var_class_, + interface: var_interface_, + }; + } +} + +impl SseDecode for crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + // 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_class_ = ::sse_decode(deserializer); +let mut var_interface_ = ::sse_decode(deserializer); +return crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync{class: var_class_, interface: var_interface_};} + } + +impl SseDecode for crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithDartKeywordFieldTwinRustAsyncSse { + // 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_class_ = ::sse_decode(deserializer); +let mut var_interface_ = ::sse_decode(deserializer); +return crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithDartKeywordFieldTwinRustAsyncSse{class: var_class_, interface: var_interface_};} + } + +impl SseDecode + for crate::api::pseudo_manual::structure_twin_sse::StructWithDartKeywordFieldTwinSse +{ + // 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_class_ = ::sse_decode(deserializer); + let mut var_interface_ = ::sse_decode(deserializer); + return crate::api::pseudo_manual::structure_twin_sse::StructWithDartKeywordFieldTwinSse { + class: var_class_, + interface: var_interface_, + }; + } +} + +impl SseDecode + for crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync +{ + // 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_class_ = ::sse_decode(deserializer); + let mut var_interface_ = ::sse_decode(deserializer); + return crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync{class: var_class_, interface: var_interface_}; + } +} + +impl SseDecode + for crate::api::pseudo_manual::structure_twin_sync_sse::StructWithDartKeywordFieldTwinSyncSse +{ + // 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_class_ = ::sse_decode(deserializer); + let mut var_interface_ = ::sse_decode(deserializer); + return crate::api::pseudo_manual::structure_twin_sync_sse::StructWithDartKeywordFieldTwinSyncSse{class: var_class_, interface: var_interface_}; + } +} + impl SseDecode for crate::api::misc_example::StructWithEnumTwinNormal { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -64895,6 +65131,62 @@ let mut var_normal = ::sse_decode(deserializer); return crate::api::pseudo_manual::rust_auto_opaque_twin_sync_sse_moi::StructWithExplicitAutoOpaqueFieldTwinSyncSseMoi{auto_opaque: var_autoOpaque, normal: var_normal};} } +impl SseDecode for crate::api::structure::StructWithFieldRenameTwinNormal { + // 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_renamed_field = ::sse_decode(deserializer); + return crate::api::structure::StructWithFieldRenameTwinNormal { + class: var_renamed_field, + }; + } +} + +impl SseDecode + for crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync +{ + // 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_renamed_field = ::sse_decode(deserializer); + return crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync{class: var_renamed_field}; + } +} + +impl SseDecode for crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithFieldRenameTwinRustAsyncSse { + // 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_renamed_field = ::sse_decode(deserializer); +return crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithFieldRenameTwinRustAsyncSse{class: var_renamed_field};} + } + +impl SseDecode for crate::api::pseudo_manual::structure_twin_sse::StructWithFieldRenameTwinSse { + // 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_renamed_field = ::sse_decode(deserializer); + return crate::api::pseudo_manual::structure_twin_sse::StructWithFieldRenameTwinSse { + class: var_renamed_field, + }; + } +} + +impl SseDecode for crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + // 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_renamed_field = ::sse_decode(deserializer); + return crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + class: var_renamed_field, + }; + } +} + +impl SseDecode + for crate::api::pseudo_manual::structure_twin_sync_sse::StructWithFieldRenameTwinSyncSse +{ + // 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_renamed_field = ::sse_decode(deserializer); + return crate::api::pseudo_manual::structure_twin_sync_sse::StructWithFieldRenameTwinSyncSse{class: var_renamed_field}; + } +} + impl SseDecode for crate::api::pseudo_manual::rust_auto_opaque_twin_moi::StructWithGoodAndOpaqueFieldTwinMoi { @@ -80062,6 +80354,140 @@ impl } } // Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::structure::StructWithDartKeywordFieldTwinNormal { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.class.into_into_dart().into_dart(), + self.interface.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::structure::StructWithDartKeywordFieldTwinNormal +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::structure::StructWithDartKeywordFieldTwinNormal +{ + fn into_into_dart(self) -> crate::api::structure::StructWithDartKeywordFieldTwinNormal { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.class.into_into_dart().into_dart(), +self.interface.into_into_dart().into_dart() + ].into_dart() + } + } +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + fn into_into_dart(self) -> crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + self + } + } +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithDartKeywordFieldTwinRustAsyncSse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.class.into_into_dart().into_dart(), +self.interface.into_into_dart().into_dart() + ].into_dart() + } + } +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithDartKeywordFieldTwinRustAsyncSse {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithDartKeywordFieldTwinRustAsyncSse { + fn into_into_dart(self) -> crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithDartKeywordFieldTwinRustAsyncSse { + self + } + } +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::pseudo_manual::structure_twin_sse::StructWithDartKeywordFieldTwinSse +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.class.into_into_dart().into_dart(), + self.interface.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::pseudo_manual::structure_twin_sse::StructWithDartKeywordFieldTwinSse +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::pseudo_manual::structure_twin_sse::StructWithDartKeywordFieldTwinSse, + > for crate::api::pseudo_manual::structure_twin_sse::StructWithDartKeywordFieldTwinSse +{ + fn into_into_dart( + self, + ) -> crate::api::pseudo_manual::structure_twin_sse::StructWithDartKeywordFieldTwinSse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.class.into_into_dart().into_dart(), + self.interface.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync, + > for crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync +{ + fn into_into_dart( + self, + ) -> crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::pseudo_manual::structure_twin_sync_sse::StructWithDartKeywordFieldTwinSyncSse +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.class.into_into_dart().into_dart(), + self.interface.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::pseudo_manual::structure_twin_sync_sse::StructWithDartKeywordFieldTwinSyncSse +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::pseudo_manual::structure_twin_sync_sse::StructWithDartKeywordFieldTwinSyncSse, + > + for crate::api::pseudo_manual::structure_twin_sync_sse::StructWithDartKeywordFieldTwinSyncSse +{ + fn into_into_dart( + self, + ) -> crate::api::pseudo_manual::structure_twin_sync_sse::StructWithDartKeywordFieldTwinSyncSse + { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::api::misc_example::StructWithEnumTwinNormal { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ @@ -80412,6 +80838,130 @@ impl flutter_rust_bridge::IntoIntoDart flutter_rust_bridge::for_generated::DartAbi { + [self.class.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::structure::StructWithFieldRenameTwinNormal +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::structure::StructWithFieldRenameTwinNormal +{ + fn into_into_dart(self) -> crate::api::structure::StructWithFieldRenameTwinNormal { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.class.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync, + > for crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync +{ + fn into_into_dart( + self, + ) -> crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync + { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithFieldRenameTwinRustAsyncSse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.class.into_into_dart().into_dart() + ].into_dart() + } + } +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithFieldRenameTwinRustAsyncSse {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithFieldRenameTwinRustAsyncSse { + fn into_into_dart(self) -> crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithFieldRenameTwinRustAsyncSse { + self + } + } +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::pseudo_manual::structure_twin_sse::StructWithFieldRenameTwinSse +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.class.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::pseudo_manual::structure_twin_sse::StructWithFieldRenameTwinSse +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::pseudo_manual::structure_twin_sse::StructWithFieldRenameTwinSse, + > for crate::api::pseudo_manual::structure_twin_sse::StructWithFieldRenameTwinSse +{ + fn into_into_dart( + self, + ) -> crate::api::pseudo_manual::structure_twin_sse::StructWithFieldRenameTwinSse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.class.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync, + > for crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync +{ + fn into_into_dart( + self, + ) -> crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::pseudo_manual::structure_twin_sync_sse::StructWithFieldRenameTwinSyncSse +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.class.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::pseudo_manual::structure_twin_sync_sse::StructWithFieldRenameTwinSyncSse +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::pseudo_manual::structure_twin_sync_sse::StructWithFieldRenameTwinSyncSse, + > for crate::api::pseudo_manual::structure_twin_sync_sse::StructWithFieldRenameTwinSyncSse +{ + fn into_into_dart( + self, + ) -> crate::api::pseudo_manual::structure_twin_sync_sse::StructWithFieldRenameTwinSyncSse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::rust_auto_opaque_twin_moi::StructWithGoodAndOpaqueFieldTwinMoi { @@ -98877,6 +99427,56 @@ impl SseEncode for crate::api::misc_no_twin_example_a::StructWithCustomNameMetho } } +impl SseEncode for crate::api::structure::StructWithDartKeywordFieldTwinNormal { + // 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.class, serializer); + ::sse_encode(self.interface, serializer); + } +} + +impl SseEncode for crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + // 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.class, serializer); +::sse_encode(self.interface, serializer);} + } + +impl SseEncode for crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithDartKeywordFieldTwinRustAsyncSse { + // 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.class, serializer); +::sse_encode(self.interface, serializer);} + } + +impl SseEncode + for crate::api::pseudo_manual::structure_twin_sse::StructWithDartKeywordFieldTwinSse +{ + // 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.class, serializer); + ::sse_encode(self.interface, serializer); + } +} + +impl SseEncode + for crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync +{ + // 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.class, serializer); + ::sse_encode(self.interface, serializer); + } +} + +impl SseEncode + for crate::api::pseudo_manual::structure_twin_sync_sse::StructWithDartKeywordFieldTwinSyncSse +{ + // 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.class, serializer); + ::sse_encode(self.interface, serializer); + } +} + impl SseEncode for crate::api::misc_example::StructWithEnumTwinNormal { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -99021,6 +99621,50 @@ impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_sync_sse_moi ::sse_encode(self.normal, serializer);} } +impl SseEncode for crate::api::structure::StructWithFieldRenameTwinNormal { + // 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.class, serializer); + } +} + +impl SseEncode + for crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync +{ + // 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.class, serializer); + } +} + +impl SseEncode for crate::api::pseudo_manual::structure_twin_rust_async_sse::StructWithFieldRenameTwinRustAsyncSse { + // 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.class, serializer);} + } + +impl SseEncode for crate::api::pseudo_manual::structure_twin_sse::StructWithFieldRenameTwinSse { + // 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.class, serializer); + } +} + +impl SseEncode for crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + // 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.class, serializer); + } +} + +impl SseEncode + for crate::api::pseudo_manual::structure_twin_sync_sse::StructWithFieldRenameTwinSyncSse +{ + // 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.class, serializer); + } +} + impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_moi::StructWithGoodAndOpaqueFieldTwinMoi { diff --git a/frb_example/pure_dart/rust/src/frb_generated.web.rs b/frb_example/pure_dart/rust/src/frb_generated.web.rs index 0e049746ce..9e859e6559 100644 --- a/frb_example/pure_dart/rust/src/frb_generated.web.rs +++ b/frb_example/pure_dart/rust/src/frb_generated.web.rs @@ -7491,6 +7491,56 @@ 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::structure::StructWithDartKeywordFieldTwinNormal { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::api::structure::StructWithDartKeywordFieldTwinNormal { + class: self_.get(0).cst_decode(), + interface: self_.get(1).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::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + let self_ = self.dyn_into::().unwrap(); + assert_eq!(self_.length(), 2, "Expected 2 elements, got {}", self_.length()); + crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync{class: self_.get(0).cst_decode(),interface: self_.get(1).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::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync { + class: self_.get(0).cst_decode(), + interface: self_.get(1).cst_decode(), + } + } +} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -7617,6 +7667,70 @@ 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::structure::StructWithFieldRenameTwinNormal { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::structure::StructWithFieldRenameTwinNormal { + class: self_.get(0).cst_decode(), + } + } +} +impl + CstDecode< + crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync, + > 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::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync + { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync { + class: 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::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + class: self_.get(0).cst_decode(), + } + } +} impl CstDecode< crate::api::pseudo_manual::rust_auto_opaque_twin_moi::StructWithGoodAndOpaqueFieldTwinMoi, @@ -37872,6 +37986,22 @@ pub fn wire__crate__api__pseudo_manual__stream_twin_sse__stream_sink_inside_vec_ ) } +#[wasm_bindgen] +pub fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async_impl(port_, arg) +} + +#[wasm_bindgen] +pub fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async_impl(port_, arg) +} + #[wasm_bindgen] pub fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_one_field_twin_rust_async( port_: flutter_rust_bridge::for_generated::MessagePort, @@ -37912,6 +38042,26 @@ pub fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_st wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct_with_two_field_twin_rust_async_impl(port_, arg) } +#[wasm_bindgen] +pub fn wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_dart_keyword_field_twin_rust_async_sse_impl(port_, ptr_, rust_vec_len_, data_len_) +} + +#[wasm_bindgen] +pub fn wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_for_struct_with_field_rename_twin_rust_async_sse_impl(port_, ptr_, rust_vec_len_, data_len_) +} + #[wasm_bindgen] pub fn wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_struct_with_one_field_twin_rust_async_sse( port_: flutter_rust_bridge::for_generated::MessagePort, @@ -37962,6 +38112,26 @@ pub fn wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_tupl wire__crate__api__pseudo_manual__structure_twin_rust_async_sse__func_tuple_struct_with_two_field_twin_rust_async_sse_impl(port_, ptr_, rust_vec_len_, data_len_) } +#[wasm_bindgen] +pub fn wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_dart_keyword_field_twin_sse_impl(port_, ptr_, rust_vec_len_, data_len_) +} + +#[wasm_bindgen] +pub fn wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + wire__crate__api__pseudo_manual__structure_twin_sse__func_for_struct_with_field_rename_twin_sse_impl(port_, ptr_, rust_vec_len_, data_len_) +} + #[wasm_bindgen] pub fn wire__crate__api__pseudo_manual__structure_twin_sse__func_struct_with_one_field_twin_sse( port_: flutter_rust_bridge::for_generated::MessagePort, @@ -38027,6 +38197,20 @@ pub fn wire__crate__api__pseudo_manual__structure_twin_sse__func_tuple_struct_wi wire__crate__api__pseudo_manual__structure_twin_sse__func_tuple_struct_with_two_field_twin_sse_impl(port_, ptr_, rust_vec_len_, data_len_) } +#[wasm_bindgen] +pub fn wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync( + arg: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync_impl(arg) +} + +#[wasm_bindgen] +pub fn wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync( + arg: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync_impl(arg) +} + #[wasm_bindgen] pub fn wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_one_field_twin_sync( arg: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, @@ -38068,6 +38252,24 @@ pub fn wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_w wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_two_field_twin_sync_impl(arg) } +#[wasm_bindgen] +pub fn wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_dart_keyword_field_twin_sync_sse_impl(ptr_, rust_vec_len_, data_len_) +} + +#[wasm_bindgen] +pub fn wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_for_struct_with_field_rename_twin_sync_sse_impl(ptr_, rust_vec_len_, data_len_) +} + #[wasm_bindgen] pub fn wire__crate__api__pseudo_manual__structure_twin_sync_sse__func_struct_with_one_field_twin_sync_sse( ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, @@ -39209,6 +39411,24 @@ pub fn wire__crate__api__stream_misc__stream_sink_dart_async_twin_normal( wire__crate__api__stream_misc__stream_sink_dart_async_twin_normal_impl(port_, sink) } +#[wasm_bindgen] +pub fn wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal_impl( + port_, arg, + ) +} + +#[wasm_bindgen] +pub fn wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal( + port_: flutter_rust_bridge::for_generated::MessagePort, + arg: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal_impl(port_, arg) +} + #[wasm_bindgen] pub fn wire__crate__api__structure__func_struct_with_one_field_twin_normal( port_: flutter_rust_bridge::for_generated::MessagePort, diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async.dart index dc10bfb660..c12bed0826 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/raw_string_twin_rust_async.dart @@ -17,19 +17,19 @@ Future class MoreThanJustOneRawStringStructTwinRustAsync { final String regular; final String type; - final bool async; + final bool async_; final String another; const MoreThanJustOneRawStringStructTwinRustAsync({ required this.regular, required this.type, - required this.async, + required this.async_, required this.another, }); @override int get hashCode => - regular.hashCode ^ type.hashCode ^ async.hashCode ^ another.hashCode; + regular.hashCode ^ type.hashCode ^ async_.hashCode ^ another.hashCode; @override bool operator ==(Object other) => @@ -38,7 +38,7 @@ class MoreThanJustOneRawStringStructTwinRustAsync { runtimeType == other.runtimeType && regular == other.regular && type == other.type && - async == other.async && + async_ == other.async_ && another == other.another; } diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/raw_string_twin_sync.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/raw_string_twin_sync.dart index bbc0a804f6..cf424756b3 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/raw_string_twin_sync.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/raw_string_twin_sync.dart @@ -17,19 +17,19 @@ MoreThanJustOneRawStringStructTwinSync class MoreThanJustOneRawStringStructTwinSync { final String regular; final String type; - final bool async; + final bool async_; final String another; const MoreThanJustOneRawStringStructTwinSync({ required this.regular, required this.type, - required this.async, + required this.async_, required this.another, }); @override int get hashCode => - regular.hashCode ^ type.hashCode ^ async.hashCode ^ another.hashCode; + regular.hashCode ^ type.hashCode ^ async_.hashCode ^ another.hashCode; @override bool operator ==(Object other) => @@ -38,7 +38,7 @@ class MoreThanJustOneRawStringStructTwinSync { runtimeType == other.runtimeType && regular == other.regular && type == other.type && - async == other.async && + async_ == other.async_ && another == other.another; } diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/structure_twin_rust_async.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/structure_twin_rust_async.dart index acf711226b..3e61eb324d 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/structure_twin_rust_async.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/structure_twin_rust_async.dart @@ -38,6 +38,59 @@ Future< .crateApiPseudoManualStructureTwinRustAsyncFuncTupleStructWithTwoFieldTwinRustAsync( arg: arg); +Future< + StructWithFieldRenameTwinRustAsync> funcForStructWithFieldRenameTwinRustAsync( + {required StructWithFieldRenameTwinRustAsync arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithFieldRenameTwinRustAsync( + arg: arg); + +Future + funcForStructWithDartKeywordFieldTwinRustAsync( + {required StructWithDartKeywordFieldTwinRustAsync arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithDartKeywordFieldTwinRustAsync( + arg: arg); + +class StructWithDartKeywordFieldTwinRustAsync { + final int class_; + final PlatformInt64 interface_; + + const StructWithDartKeywordFieldTwinRustAsync({ + required this.class_, + required this.interface_, + }); + + @override + int get hashCode => class_.hashCode ^ interface_.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithDartKeywordFieldTwinRustAsync && + runtimeType == other.runtimeType && + class_ == other.class_ && + interface_ == other.interface_; +} + +class StructWithFieldRenameTwinRustAsync { + final int renamed_field; + + const StructWithFieldRenameTwinRustAsync({ + required this.renamed_field, + }); + + @override + int get hashCode => renamed_field.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithFieldRenameTwinRustAsync && + runtimeType == other.runtimeType && + renamed_field == other.renamed_field; +} + class StructWithOneFieldTwinRustAsync { final int a; diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/structure_twin_sync.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/structure_twin_sync.dart index 15b4c73266..ab90a6c7fc 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/structure_twin_sync.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/structure_twin_sync.dart @@ -36,6 +36,57 @@ TupleStructWithTwoFieldTwinSync funcTupleStructWithTwoFieldTwinSync( .crateApiPseudoManualStructureTwinSyncFuncTupleStructWithTwoFieldTwinSync( arg: arg); +StructWithFieldRenameTwinSync funcForStructWithFieldRenameTwinSync( + {required StructWithFieldRenameTwinSync arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinSyncFuncForStructWithFieldRenameTwinSync( + arg: arg); + +StructWithDartKeywordFieldTwinSync funcForStructWithDartKeywordFieldTwinSync( + {required StructWithDartKeywordFieldTwinSync arg}) => + RustLib.instance.api + .crateApiPseudoManualStructureTwinSyncFuncForStructWithDartKeywordFieldTwinSync( + arg: arg); + +class StructWithDartKeywordFieldTwinSync { + final int class_; + final PlatformInt64 interface_; + + const StructWithDartKeywordFieldTwinSync({ + required this.class_, + required this.interface_, + }); + + @override + int get hashCode => class_.hashCode ^ interface_.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithDartKeywordFieldTwinSync && + runtimeType == other.runtimeType && + class_ == other.class_ && + interface_ == other.interface_; +} + +class StructWithFieldRenameTwinSync { + final int renamed_field; + + const StructWithFieldRenameTwinSync({ + required this.renamed_field, + }); + + @override + int get hashCode => renamed_field.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithFieldRenameTwinSync && + runtimeType == other.runtimeType && + renamed_field == other.renamed_field; +} + class StructWithOneFieldTwinSync { final int a; diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/raw_string.dart b/frb_example/pure_dart_pde/lib/src/rust/api/raw_string.dart index 35fe807e52..efafd4bfb6 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/raw_string.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/raw_string.dart @@ -16,19 +16,19 @@ Future class MoreThanJustOneRawStringStructTwinNormal { final String regular; final String type; - final bool async; + final bool async_; final String another; const MoreThanJustOneRawStringStructTwinNormal({ required this.regular, required this.type, - required this.async, + required this.async_, required this.another, }); @override int get hashCode => - regular.hashCode ^ type.hashCode ^ async.hashCode ^ another.hashCode; + regular.hashCode ^ type.hashCode ^ async_.hashCode ^ another.hashCode; @override bool operator ==(Object other) => @@ -37,7 +37,7 @@ class MoreThanJustOneRawStringStructTwinNormal { runtimeType == other.runtimeType && regular == other.regular && type == other.type && - async == other.async && + async_ == other.async_ && another == other.another; } diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/structure.dart b/frb_example/pure_dart_pde/lib/src/rust/api/structure.dart index 0803ab4251..b025b9a653 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/structure.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/structure.dart @@ -31,6 +31,57 @@ Future funcTupleStructWithTwoFieldTwinNormal( RustLib.instance.api .crateApiStructureFuncTupleStructWithTwoFieldTwinNormal(arg: arg); +Future funcForStructWithFieldRenameTwinNormal( + {required StructWithFieldRenameTwinNormal arg}) => + RustLib.instance.api + .crateApiStructureFuncForStructWithFieldRenameTwinNormal(arg: arg); + +Future + funcForStructWithDartKeywordFieldTwinNormal( + {required StructWithDartKeywordFieldTwinNormal arg}) => + RustLib.instance.api + .crateApiStructureFuncForStructWithDartKeywordFieldTwinNormal( + arg: arg); + +class StructWithDartKeywordFieldTwinNormal { + final int class_; + final PlatformInt64 interface_; + + const StructWithDartKeywordFieldTwinNormal({ + required this.class_, + required this.interface_, + }); + + @override + int get hashCode => class_.hashCode ^ interface_.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithDartKeywordFieldTwinNormal && + runtimeType == other.runtimeType && + class_ == other.class_ && + interface_ == other.interface_; +} + +class StructWithFieldRenameTwinNormal { + final int renamed_field; + + const StructWithFieldRenameTwinNormal({ + required this.renamed_field, + }); + + @override + int get hashCode => renamed_field.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StructWithFieldRenameTwinNormal && + runtimeType == other.runtimeType && + renamed_field == other.renamed_field; +} + class StructWithOneFieldTwinNormal { final int a; diff --git a/frb_example/pure_dart_pde/lib/src/rust/auxiliary/sample_types.dart b/frb_example/pure_dart_pde/lib/src/rust/auxiliary/sample_types.dart index aaa36f603a..2610dda2fd 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/auxiliary/sample_types.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/auxiliary/sample_types.dart @@ -7,8 +7,8 @@ import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; enum MyEnum { - False, - True, + false_, + true_, ; } diff --git a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart index 6ab6581731..baf565bc90 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart @@ -196,7 +196,7 @@ class RustLib extends BaseEntrypoint { String get codegenVersion => '2.0.0-dev.38'; @override - int get rustContentHash => -409428289; + int get rustContentHash => -263748021; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -3979,6 +3979,14 @@ abstract class RustLibApi extends BaseApi { crateApiPseudoManualStreamTwinRustAsyncStreamSinkInsideVecTwinRustAsync( {required List> arg}); + Future + crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithDartKeywordFieldTwinRustAsync( + {required StructWithDartKeywordFieldTwinRustAsync arg}); + + Future + crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithFieldRenameTwinRustAsync( + {required StructWithFieldRenameTwinRustAsync arg}); + Future crateApiPseudoManualStructureTwinRustAsyncFuncStructWithOneFieldTwinRustAsync( {required StructWithOneFieldTwinRustAsync arg}); @@ -3999,6 +4007,14 @@ abstract class RustLibApi extends BaseApi { crateApiPseudoManualStructureTwinRustAsyncFuncTupleStructWithTwoFieldTwinRustAsync( {required TupleStructWithTwoFieldTwinRustAsync arg}); + StructWithDartKeywordFieldTwinSync + crateApiPseudoManualStructureTwinSyncFuncForStructWithDartKeywordFieldTwinSync( + {required StructWithDartKeywordFieldTwinSync arg}); + + StructWithFieldRenameTwinSync + crateApiPseudoManualStructureTwinSyncFuncForStructWithFieldRenameTwinSync( + {required StructWithFieldRenameTwinSync arg}); + StructWithOneFieldTwinSync crateApiPseudoManualStructureTwinSyncFuncStructWithOneFieldTwinSync( {required StructWithOneFieldTwinSync arg}); @@ -4329,6 +4345,14 @@ abstract class RustLibApi extends BaseApi { Future> crateApiStreamMiscStreamSinkDartAsyncTwinNormal(); + Future + crateApiStructureFuncForStructWithDartKeywordFieldTwinNormal( + {required StructWithDartKeywordFieldTwinNormal arg}); + + Future + crateApiStructureFuncForStructWithFieldRenameTwinNormal( + {required StructWithFieldRenameTwinNormal arg}); + Future crateApiStructureFuncStructWithOneFieldTwinNormal( {required StructWithOneFieldTwinNormal arg}); @@ -35755,6 +35779,68 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["arg"], ); + @override + Future + crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithDartKeywordFieldTwinRustAsync( + {required StructWithDartKeywordFieldTwinRustAsync arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + arg, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 1094, port: port_); + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_struct_with_dart_keyword_field_twin_rust_async, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinRustAsyncFuncForStructWithDartKeywordFieldTwinRustAsyncConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinRustAsyncFuncForStructWithDartKeywordFieldTwinRustAsyncConstMeta => + const TaskConstMeta( + debugName: + "func_for_struct_with_dart_keyword_field_twin_rust_async", + argNames: ["arg"], + ); + + @override + Future + crateApiPseudoManualStructureTwinRustAsyncFuncForStructWithFieldRenameTwinRustAsync( + {required StructWithFieldRenameTwinRustAsync arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_field_rename_twin_rust_async( + arg, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 1095, port: port_); + }, + codec: SseCodec( + decodeSuccessData: sse_decode_struct_with_field_rename_twin_rust_async, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinRustAsyncFuncForStructWithFieldRenameTwinRustAsyncConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinRustAsyncFuncForStructWithFieldRenameTwinRustAsyncConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_field_rename_twin_rust_async", + argNames: ["arg"], + ); + @override Future crateApiPseudoManualStructureTwinRustAsyncFuncStructWithOneFieldTwinRustAsync( @@ -35765,7 +35851,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_struct_with_one_field_twin_rust_async( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1094, port: port_); + funcId: 1096, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_struct_with_one_field_twin_rust_async, @@ -35795,7 +35881,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_struct_with_two_field_twin_rust_async( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1095, port: port_); + funcId: 1097, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_struct_with_two_field_twin_rust_async, @@ -35825,7 +35911,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_struct_with_zero_field_twin_rust_async( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1096, port: port_); + funcId: 1098, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_struct_with_zero_field_twin_rust_async, @@ -35855,7 +35941,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_tuple_struct_with_one_field_twin_rust_async( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1097, port: port_); + funcId: 1099, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -35886,7 +35972,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_tuple_struct_with_two_field_twin_rust_async( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1098, port: port_); + funcId: 1100, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -35907,6 +35993,64 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["arg"], ); + @override + StructWithDartKeywordFieldTwinSync + crateApiPseudoManualStructureTwinSyncFuncForStructWithDartKeywordFieldTwinSync( + {required StructWithDartKeywordFieldTwinSync arg}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + arg, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1101)!; + }, + codec: SseCodec( + decodeSuccessData: sse_decode_struct_with_dart_keyword_field_twin_sync, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinSyncFuncForStructWithDartKeywordFieldTwinSyncConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinSyncFuncForStructWithDartKeywordFieldTwinSyncConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_dart_keyword_field_twin_sync", + argNames: ["arg"], + ); + + @override + StructWithFieldRenameTwinSync + crateApiPseudoManualStructureTwinSyncFuncForStructWithFieldRenameTwinSync( + {required StructWithFieldRenameTwinSync arg}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_field_rename_twin_sync( + arg, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1102)!; + }, + codec: SseCodec( + decodeSuccessData: sse_decode_struct_with_field_rename_twin_sync, + decodeErrorData: null, + ), + constMeta: + kCrateApiPseudoManualStructureTwinSyncFuncForStructWithFieldRenameTwinSyncConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiPseudoManualStructureTwinSyncFuncForStructWithFieldRenameTwinSyncConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_field_rename_twin_sync", + argNames: ["arg"], + ); + @override StructWithOneFieldTwinSync crateApiPseudoManualStructureTwinSyncFuncStructWithOneFieldTwinSync( @@ -35915,7 +36059,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_box_autoadd_struct_with_one_field_twin_sync(arg, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1099)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1103)!; }, codec: SseCodec( decodeSuccessData: sse_decode_struct_with_one_field_twin_sync, @@ -35943,7 +36087,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_box_autoadd_struct_with_two_field_twin_sync(arg, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1100)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1104)!; }, codec: SseCodec( decodeSuccessData: sse_decode_struct_with_two_field_twin_sync, @@ -35972,7 +36116,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_box_autoadd_struct_with_zero_field_twin_sync( arg, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1101)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1105)!; }, codec: SseCodec( decodeSuccessData: sse_decode_struct_with_zero_field_twin_sync, @@ -36001,7 +36145,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_box_autoadd_tuple_struct_with_one_field_twin_sync( arg, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1102)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1106)!; }, codec: SseCodec( decodeSuccessData: sse_decode_tuple_struct_with_one_field_twin_sync, @@ -36030,7 +36174,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_box_autoadd_tuple_struct_with_two_field_twin_sync( arg, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1103)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1107)!; }, codec: SseCodec( decodeSuccessData: sse_decode_tuple_struct_with_two_field_twin_sync, @@ -36058,7 +36202,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_record_string_i_32(value, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1104, port: port_); + funcId: 1108, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -36087,7 +36231,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_opt_box_autoadd_record_string_i_32(value, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1105, port: port_); + funcId: 1109, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_record_string_i_32, @@ -36114,7 +36258,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_record_string_i_32(value, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1106)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1110)!; }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -36140,7 +36284,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_opt_box_autoadd_record_string_i_32(value, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1107)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1111)!; }, codec: SseCodec( decodeSuccessData: sse_decode_record_string_i_32, @@ -36168,7 +36312,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_u_64(input, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1108, port: port_); + funcId: 1112, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -36197,7 +36341,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_u_64(input, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1109, port: port_); + funcId: 1113, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_test_model_twin_rust_async, @@ -36226,7 +36370,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_u_64(input, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1110, port: port_); + funcId: 1114, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -36253,7 +36397,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_u_64(input, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1111)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1115)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -36281,7 +36425,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_u_64(input, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1112)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1116)!; }, codec: SseCodec( decodeSuccessData: sse_decode_test_model_twin_sync, @@ -36308,7 +36452,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_u_64(input, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1113)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1117)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -36337,7 +36481,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_box_autoadd_feature_uuid_twin_rust_async(ids, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1114, port: port_); + funcId: 1118, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_feature_uuid_twin_rust_async, @@ -36366,7 +36510,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Uuid(id, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1115, port: port_); + funcId: 1119, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_Uuid, @@ -36395,7 +36539,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_Uuid(ids, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1116, port: port_); + funcId: 1120, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_list_Uuid, @@ -36423,7 +36567,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_box_autoadd_feature_uuid_twin_sync(ids, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1117)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1121)!; }, codec: SseCodec( decodeSuccessData: sse_decode_feature_uuid_twin_sync, @@ -36450,7 +36594,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Uuid(id, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1118)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1122)!; }, codec: SseCodec( decodeSuccessData: sse_decode_Uuid, @@ -36477,7 +36621,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_Uuid(ids, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1119)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1123)!; }, codec: SseCodec( decodeSuccessData: sse_decode_list_Uuid, @@ -36504,7 +36648,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1120, port: port_); + funcId: 1124, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -36532,7 +36676,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1121, port: port_); + funcId: 1125, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_raw_string_item_struct_twin_normal, @@ -36561,7 +36705,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1122, port: port_); + funcId: 1126, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -36592,7 +36736,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1123, port: port_); + funcId: 1127, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -36623,7 +36767,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1124, port: port_); + funcId: 1128, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -36654,7 +36798,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1125, port: port_); + funcId: 1129, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_i_32, @@ -36685,7 +36829,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1126, port: port_); + funcId: 1130, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -36714,7 +36858,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1127, port: port_); + funcId: 1131, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -36742,7 +36886,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1128, port: port_); + funcId: 1132, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -36770,7 +36914,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1129, port: port_); + funcId: 1133, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -36801,7 +36945,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1130, port: port_); + funcId: 1134, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -36832,7 +36976,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1131, port: port_); + funcId: 1135, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -36863,7 +37007,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1132, port: port_); + funcId: 1136, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -36891,7 +37035,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1133, port: port_); + funcId: 1137, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -36922,7 +37066,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructWithGoodAndOpaqueFieldWithoutOptionTwinNormal( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1134)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1138)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -36954,7 +37098,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructWithGoodAndOpaqueFieldWithoutOptionTwinNormal( that, serializer); sse_encode_String(good, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1135)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1139)!; }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -36985,7 +37129,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { arg, serializer); sse_encode_i_32(expect, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1137, port: port_); + funcId: 1141, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37018,7 +37162,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(expect, serializer); sse_encode_i_32(adder, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1138, port: port_); + funcId: 1142, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37048,7 +37192,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1139, port: port_); + funcId: 1143, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -37079,7 +37223,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { arg, serializer); sse_encode_i_32(expect, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1140, port: port_); + funcId: 1144, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37109,7 +37253,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { arg, serializer); sse_encode_list_prim_i_32_loose(expect, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1141, port: port_); + funcId: 1145, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37141,7 +37285,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( b, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1142, port: port_); + funcId: 1146, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_i_32, @@ -37173,7 +37317,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( mutBorrow, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1143, port: port_); + funcId: 1147, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_i_32, @@ -37202,7 +37346,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBoxdynFnStringStringSendSync( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1144, port: port_); + funcId: 1148, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37229,7 +37373,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1145, port: port_); + funcId: 1149, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -37262,7 +37406,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerEnumWithGoodAndOpaqueWithoutOptionTwinNormal( b, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1146, port: port_); + funcId: 1150, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37290,7 +37434,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleEnumTwinNormal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1147, port: port_); + funcId: 1151, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37317,7 +37461,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1148, port: port_); + funcId: 1152, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -37348,7 +37492,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_enum_with_good_and_opaque_twin_normal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1149, port: port_); + funcId: 1153, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37376,7 +37520,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1150, port: port_); + funcId: 1154, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_enum_with_good_and_opaque_twin_normal, @@ -37404,7 +37548,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1151, port: port_); + funcId: 1155, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_enum_with_good_and_opaque_twin_normal, @@ -37435,7 +37579,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { arg, serializer); sse_encode_i_32(expect, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1152, port: port_); + funcId: 1156, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37462,7 +37606,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1153, port: port_); + funcId: 1157, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -37492,7 +37636,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_i_32(initial, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1154, port: port_); + funcId: 1158, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -37522,7 +37666,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_struct_with_explicit_auto_opaque_field_twin_normal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1155, port: port_); + funcId: 1159, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37552,7 +37696,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { a, serializer); sse_encode_String(b, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1156, port: port_); + funcId: 1160, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37581,7 +37725,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBoxdynMyTraitTwinNormalSendSync( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1157, port: port_); + funcId: 1161, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37608,7 +37752,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1158, port: port_); + funcId: 1162, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -37636,7 +37780,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1159, port: port_); + funcId: 1163, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -37664,7 +37808,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1160, port: port_); + funcId: 1164, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -37694,7 +37838,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_i_32(initial, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1161, port: port_); + funcId: 1165, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -37722,7 +37866,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1162, port: port_); + funcId: 1166, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -37755,7 +37899,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( orange, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1163, port: port_); + funcId: 1167, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_i_32, @@ -37784,7 +37928,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal_Sse( sink, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1164, port: port_); + funcId: 1168, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37815,7 +37959,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_struct_with_good_and_opaque_field_twin_normal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1165, port: port_); + funcId: 1169, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37843,7 +37987,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1166, port: port_); + funcId: 1170, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -37877,7 +38021,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( b, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1167, port: port_); + funcId: 1171, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -37904,7 +38048,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1168, port: port_); + funcId: 1172, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_enum_opaque_twin_normal_array_5, @@ -37930,7 +38074,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1169, port: port_); + funcId: 1173, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_opaque_nested_twin_normal, @@ -37954,7 +38098,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1170, port: port_); + funcId: 1174, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_RustOpaque_HideDataTwinNormal, @@ -37981,7 +38125,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_opt_box_autoadd_RustOpaque_HideDataTwinNormal( opaque, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1171, port: port_); + funcId: 1175, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -38007,7 +38151,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1172, port: port_); + funcId: 1176, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_RustOpaque_FrbOpaqueReturnTwinNormal, @@ -38033,7 +38177,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_RustOpaque_HideDataTwinNormal_array_2(data, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1173, port: port_); + funcId: 1177, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38057,7 +38201,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1174, port: port_); + funcId: 1178, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_RustOpaque_HideDataTwinNormal_array_2, @@ -38083,7 +38227,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_RustOpaque_HideDataTwinNormal(data, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1175, port: port_); + funcId: 1179, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38107,7 +38251,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1176, port: port_); + funcId: 1180, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_list_RustOpaque_HideDataTwinNormal, @@ -38133,7 +38277,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_box_autoadd_enum_opaque_twin_normal(opaque, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1177, port: port_); + funcId: 1181, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -38159,7 +38303,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_box_autoadd_opaque_nested_twin_normal(opaque, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1178, port: port_); + funcId: 1182, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38185,7 +38329,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_RustOpaque_NonCloneDataTwinNormal(clone, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1179, port: port_); + funcId: 1183, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -38211,7 +38355,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_RustOpaque_HideDataTwinNormal(opaque, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1180, port: port_); + funcId: 1184, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -38237,7 +38381,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_RustOpaque_HideDataTwinNormal(opaque, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1181, port: port_); + funcId: 1185, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -38263,7 +38407,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_RustOpaque_HideDataTwinNormal(opaque, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1182, port: port_); + funcId: 1186, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -38287,7 +38431,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1183)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1187)!; }, codec: SseCodec( decodeSuccessData: sse_decode_RustOpaque_FrbOpaqueSyncReturnTwinNormal, @@ -38311,7 +38455,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1184)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1188)!; }, codec: SseCodec( decodeSuccessData: sse_decode_RustOpaque_NonCloneDataTwinNormal, @@ -38335,7 +38479,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1185)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1189)!; }, codec: SseCodec( decodeSuccessData: sse_decode_RustOpaque_HideDataAnotherTwinNormal, @@ -38360,7 +38504,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1186)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1190)!; }, codec: SseCodec( decodeSuccessData: @@ -38389,7 +38533,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(a, serializer); sse_encode_i_32(b, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1187, port: port_); + funcId: 1191, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_i_32, @@ -38415,7 +38559,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_StreamSink_i_32_Sse(sink, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1188, port: port_); + funcId: 1192, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38443,7 +38587,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_StreamSink_String_Sse(sink, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1189, port: port_); + funcId: 1193, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38470,7 +38614,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_StreamSink_String_Sse(sink, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1190, port: port_); + funcId: 1194, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38500,7 +38644,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_u_32(b, serializer); sse_encode_StreamSink_u_32_Sse(c, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1191, port: port_); + funcId: 1195, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38529,7 +38673,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_StreamSink_my_stream_entry_twin_normal_Sse(sink, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1192, port: port_); + funcId: 1196, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38559,7 +38703,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_u_32(max, serializer); sse_encode_StreamSink_log_twin_normal_Sse(sink, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1193, port: port_); + funcId: 1197, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38589,7 +38733,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_StreamSink_log_twin_normal_Sse(sink, serializer); sse_encode_u_32(max, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1194, port: port_); + funcId: 1198, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38619,7 +38763,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_u_32(key, serializer); sse_encode_u_32(max, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1195, port: port_); + funcId: 1199, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38647,7 +38791,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_StreamSink_u_8_array_2_Sse(sink, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1196, port: port_); + funcId: 1200, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38677,7 +38821,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_my_struct_containing_stream_sink_twin_normal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1197, port: port_); + funcId: 1201, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38703,7 +38847,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_StreamSink_i_32_Sse(arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1198, port: port_); + funcId: 1202, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38731,7 +38875,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_StreamSink_String_Sse(sink, serializer); sse_encode_String(arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1199, port: port_); + funcId: 1203, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38758,7 +38902,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_StreamSink_i_32_Sse(sink, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1200, port: port_); + funcId: 1204, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38777,6 +38921,67 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { argNames: ["sink"], ); + @override + Future + crateApiStructureFuncForStructWithDartKeywordFieldTwinNormal( + {required StructWithDartKeywordFieldTwinNormal arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + arg, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 1205, port: port_); + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_struct_with_dart_keyword_field_twin_normal, + decodeErrorData: null, + ), + constMeta: + kCrateApiStructureFuncForStructWithDartKeywordFieldTwinNormalConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiStructureFuncForStructWithDartKeywordFieldTwinNormalConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_dart_keyword_field_twin_normal", + argNames: ["arg"], + ); + + @override + Future + crateApiStructureFuncForStructWithFieldRenameTwinNormal( + {required StructWithFieldRenameTwinNormal arg}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_box_autoadd_struct_with_field_rename_twin_normal( + arg, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 1206, port: port_); + }, + codec: SseCodec( + decodeSuccessData: sse_decode_struct_with_field_rename_twin_normal, + decodeErrorData: null, + ), + constMeta: + kCrateApiStructureFuncForStructWithFieldRenameTwinNormalConstMeta, + argValues: [arg], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiStructureFuncForStructWithFieldRenameTwinNormalConstMeta => + const TaskConstMeta( + debugName: "func_for_struct_with_field_rename_twin_normal", + argNames: ["arg"], + ); + @override Future crateApiStructureFuncStructWithOneFieldTwinNormal( @@ -38787,7 +38992,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_struct_with_one_field_twin_normal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1201, port: port_); + funcId: 1207, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_struct_with_one_field_twin_normal, @@ -38816,7 +39021,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_struct_with_two_field_twin_normal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1202, port: port_); + funcId: 1208, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_struct_with_two_field_twin_normal, @@ -38845,7 +39050,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_struct_with_zero_field_twin_normal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1203, port: port_); + funcId: 1209, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_struct_with_zero_field_twin_normal, @@ -38874,7 +39079,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_tuple_struct_with_one_field_twin_normal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1204, port: port_); + funcId: 1210, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_tuple_struct_with_one_field_twin_normal, @@ -38904,7 +39109,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_box_autoadd_tuple_struct_with_two_field_twin_normal( arg, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1205, port: port_); + funcId: 1211, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_tuple_struct_with_two_field_twin_normal, @@ -38932,7 +39137,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_record_string_i_32(value, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1206, port: port_); + funcId: 1212, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -38958,7 +39163,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_opt_box_autoadd_record_string_i_32(value, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1207, port: port_); + funcId: 1213, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_record_string_i_32, @@ -38984,7 +39189,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_u_64(input, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1208, port: port_); + funcId: 1214, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -39010,7 +39215,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_u_64(input, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1209, port: port_); + funcId: 1215, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_test_model_twin_normal, @@ -39036,7 +39241,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_u_64(input, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1210, port: port_); + funcId: 1216, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -39063,7 +39268,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_box_autoadd_feature_uuid_twin_normal(ids, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1211, port: port_); + funcId: 1217, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_feature_uuid_twin_normal, @@ -39089,7 +39294,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Uuid(id, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1212, port: port_); + funcId: 1218, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_Uuid, @@ -39115,7 +39320,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_Uuid(ids, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 1213, port: port_); + funcId: 1219, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_list_Uuid, @@ -44124,6 +44329,30 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return dco_decode_struct_with_custom_name_method_twin_normal(raw); } + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_dart_keyword_field_twin_normal(raw); + } + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_dart_keyword_field_twin_rust_async(raw); + } + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_dart_keyword_field_twin_sync(raw); + } + @protected StructWithEnumTwinNormal dco_decode_box_autoadd_struct_with_enum_twin_normal( dynamic raw) { @@ -44170,6 +44399,28 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return dco_decode_struct_with_explicit_auto_opaque_field_twin_sync(raw); } + @protected + StructWithFieldRenameTwinNormal + dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_field_rename_twin_normal(raw); + } + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_field_rename_twin_rust_async(raw); + } + + @protected + StructWithFieldRenameTwinSync + dco_decode_box_autoadd_struct_with_field_rename_twin_sync(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_struct_with_field_rename_twin_sync(raw); + } + @protected StructWithGoodAndOpaqueFieldTwinNormal dco_decode_box_autoadd_struct_with_good_and_opaque_field_twin_normal( @@ -47433,7 +47684,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return MoreThanJustOneRawStringStructTwinNormal( regular: dco_decode_String(arr[0]), type: dco_decode_String(arr[1]), - async: dco_decode_bool(arr[2]), + async_: dco_decode_bool(arr[2]), another: dco_decode_String(arr[3]), ); } @@ -47449,7 +47700,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return MoreThanJustOneRawStringStructTwinRustAsync( regular: dco_decode_String(arr[0]), type: dco_decode_String(arr[1]), - async: dco_decode_bool(arr[2]), + async_: dco_decode_bool(arr[2]), another: dco_decode_String(arr[3]), ); } @@ -47464,7 +47715,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return MoreThanJustOneRawStringStructTwinSync( regular: dco_decode_String(arr[0]), type: dco_decode_String(arr[1]), - async: dco_decode_bool(arr[2]), + async_: dco_decode_bool(arr[2]), another: dco_decode_String(arr[3]), ); } @@ -49560,6 +49811,45 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); } + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return StructWithDartKeywordFieldTwinNormal( + class_: dco_decode_i_32(arr[0]), + interface_: dco_decode_i_64(arr[1]), + ); + } + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_struct_with_dart_keyword_field_twin_rust_async(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return StructWithDartKeywordFieldTwinRustAsync( + class_: dco_decode_i_32(arr[0]), + interface_: dco_decode_i_64(arr[1]), + ); + } + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_struct_with_dart_keyword_field_twin_sync(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return StructWithDartKeywordFieldTwinSync( + class_: dco_decode_i_32(arr[0]), + interface_: dco_decode_i_64(arr[1]), + ); + } + @protected StructWithEnumTwinNormal dco_decode_struct_with_enum_twin_normal( dynamic raw) { @@ -49645,6 +49935,42 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); } + @protected + StructWithFieldRenameTwinNormal + dco_decode_struct_with_field_rename_twin_normal(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 StructWithFieldRenameTwinNormal( + renamed_field: dco_decode_i_32(arr[0]), + ); + } + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_struct_with_field_rename_twin_rust_async(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 StructWithFieldRenameTwinRustAsync( + renamed_field: dco_decode_i_32(arr[0]), + ); + } + + @protected + StructWithFieldRenameTwinSync dco_decode_struct_with_field_rename_twin_sync( + 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 StructWithFieldRenameTwinSync( + renamed_field: dco_decode_i_32(arr[0]), + ); + } + @protected StructWithGoodAndOpaqueFieldTwinNormal dco_decode_struct_with_good_and_opaque_field_twin_normal(dynamic raw) { @@ -54425,6 +54751,32 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { deserializer)); } + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_dart_keyword_field_twin_normal( + deserializer)); + } + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_dart_keyword_field_twin_rust_async( + deserializer)); + } + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_dart_keyword_field_twin_sync(deserializer)); + } + @protected StructWithEnumTwinNormal sse_decode_box_autoadd_struct_with_enum_twin_normal( SseDeserializer deserializer) { @@ -54474,6 +54826,30 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { deserializer)); } + @protected + StructWithFieldRenameTwinNormal + sse_decode_box_autoadd_struct_with_field_rename_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_field_rename_twin_normal(deserializer)); + } + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_field_rename_twin_rust_async(deserializer)); + } + + @protected + StructWithFieldRenameTwinSync + sse_decode_box_autoadd_struct_with_field_rename_twin_sync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_struct_with_field_rename_twin_sync(deserializer)); + } + @protected StructWithGoodAndOpaqueFieldTwinNormal sse_decode_box_autoadd_struct_with_good_and_opaque_field_twin_normal( @@ -58303,12 +58679,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs var var_regular = sse_decode_String(deserializer); var var_type = sse_decode_String(deserializer); - var var_async = sse_decode_bool(deserializer); + var var_async_ = sse_decode_bool(deserializer); var var_another = sse_decode_String(deserializer); return MoreThanJustOneRawStringStructTwinNormal( regular: var_regular, type: var_type, - async: var_async, + async_: var_async_, another: var_another); } @@ -58319,12 +58695,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs var var_regular = sse_decode_String(deserializer); var var_type = sse_decode_String(deserializer); - var var_async = sse_decode_bool(deserializer); + var var_async_ = sse_decode_bool(deserializer); var var_another = sse_decode_String(deserializer); return MoreThanJustOneRawStringStructTwinRustAsync( regular: var_regular, type: var_type, - async: var_async, + async_: var_async_, another: var_another); } @@ -58335,12 +58711,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs var var_regular = sse_decode_String(deserializer); var var_type = sse_decode_String(deserializer); - var var_async = sse_decode_bool(deserializer); + var var_async_ = sse_decode_bool(deserializer); var var_another = sse_decode_String(deserializer); return MoreThanJustOneRawStringStructTwinSync( regular: var_regular, type: var_type, - async: var_async, + async_: var_async_, another: var_another); } @@ -60503,6 +60879,39 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return StructWithCustomNameMethodTwinNormal(field0: var_field0); } + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_class_ = sse_decode_i_32(deserializer); + var var_interface_ = sse_decode_i_64(deserializer); + return StructWithDartKeywordFieldTwinNormal( + class_: var_class_, interface_: var_interface_); + } + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_class_ = sse_decode_i_32(deserializer); + var var_interface_ = sse_decode_i_64(deserializer); + return StructWithDartKeywordFieldTwinRustAsync( + class_: var_class_, interface_: var_interface_); + } + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_class_ = sse_decode_i_32(deserializer); + var var_interface_ = sse_decode_i_64(deserializer); + return StructWithDartKeywordFieldTwinSync( + class_: var_class_, interface_: var_interface_); + } + @protected StructWithEnumTwinNormal sse_decode_struct_with_enum_twin_normal( SseDeserializer deserializer) { @@ -60569,6 +60978,32 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { autoOpaque: var_autoOpaque, normal: var_normal); } + @protected + StructWithFieldRenameTwinNormal + sse_decode_struct_with_field_rename_twin_normal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_renamed_field = sse_decode_i_32(deserializer); + return StructWithFieldRenameTwinNormal(renamed_field: var_renamed_field); + } + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_renamed_field = sse_decode_i_32(deserializer); + return StructWithFieldRenameTwinRustAsync(renamed_field: var_renamed_field); + } + + @protected + StructWithFieldRenameTwinSync sse_decode_struct_with_field_rename_twin_sync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_renamed_field = sse_decode_i_32(deserializer); + return StructWithFieldRenameTwinSync(renamed_field: var_renamed_field); + } + @protected StructWithGoodAndOpaqueFieldTwinNormal sse_decode_struct_with_good_and_opaque_field_twin_normal( @@ -65696,6 +66131,27 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_struct_with_custom_name_method_twin_normal(self, serializer); } + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_dart_keyword_field_twin_normal(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_dart_keyword_field_twin_rust_async(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_dart_keyword_field_twin_sync(self, serializer); + } + @protected void sse_encode_box_autoadd_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer) { @@ -65746,6 +66202,27 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { self, serializer); } + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_field_rename_twin_normal(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_field_rename_twin_rust_async(self, serializer); + } + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_struct_with_field_rename_twin_sync(self, serializer); + } + @protected void sse_encode_box_autoadd_struct_with_good_and_opaque_field_twin_normal( StructWithGoodAndOpaqueFieldTwinNormal self, SseSerializer serializer) { @@ -68998,7 +69475,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.regular, serializer); sse_encode_String(self.type, serializer); - sse_encode_bool(self.async, serializer); + sse_encode_bool(self.async_, serializer); sse_encode_String(self.another, serializer); } @@ -69009,7 +69486,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.regular, serializer); sse_encode_String(self.type, serializer); - sse_encode_bool(self.async, serializer); + sse_encode_bool(self.async_, serializer); sse_encode_String(self.another, serializer); } @@ -69019,7 +69496,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.regular, serializer); sse_encode_String(self.type, serializer); - sse_encode_bool(self.async, serializer); + sse_encode_bool(self.async_, serializer); sse_encode_String(self.another, serializer); } @@ -70897,6 +71374,30 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(self.field0, serializer); } + @protected + void sse_encode_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.class_, serializer); + sse_encode_i_64(self.interface_, serializer); + } + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.class_, serializer); + sse_encode_i_64(self.interface_, serializer); + } + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.class_, serializer); + sse_encode_i_64(self.interface_, serializer); + } + @protected void sse_encode_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer) { @@ -70951,6 +71452,27 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(self.normal, serializer); } + @protected + void sse_encode_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.renamed_field, serializer); + } + + @protected + void sse_encode_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.renamed_field, serializer); + } + + @protected + void sse_encode_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.renamed_field, serializer); + } + @protected void sse_encode_struct_with_good_and_opaque_field_twin_normal( StructWithGoodAndOpaqueFieldTwinNormal self, SseSerializer serializer) { diff --git a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.io.dart b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.io.dart index ab31a56277..ecfae1c1a9 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.io.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.io.dart @@ -2482,6 +2482,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_box_autoadd_struct_with_custom_name_method_twin_normal( dynamic raw); + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + dynamic raw); + @protected StructWithEnumTwinNormal dco_decode_box_autoadd_struct_with_enum_twin_normal( dynamic raw); @@ -2509,6 +2524,19 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync( dynamic raw); + @protected + StructWithFieldRenameTwinNormal + dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + dynamic raw); + + @protected + StructWithFieldRenameTwinSync + dco_decode_box_autoadd_struct_with_field_rename_twin_sync(dynamic raw); + @protected StructWithGoodAndOpaqueFieldTwinNormal dco_decode_box_autoadd_struct_with_good_and_opaque_field_twin_normal( @@ -4348,6 +4376,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithCustomNameMethodTwinNormal dco_decode_struct_with_custom_name_method_twin_normal(dynamic raw); + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_struct_with_dart_keyword_field_twin_rust_async(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_struct_with_dart_keyword_field_twin_sync(dynamic raw); + @protected StructWithEnumTwinNormal dco_decode_struct_with_enum_twin_normal(dynamic raw); @@ -4372,6 +4412,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithExplicitAutoOpaqueFieldTwinSync dco_decode_struct_with_explicit_auto_opaque_field_twin_sync(dynamic raw); + @protected + StructWithFieldRenameTwinNormal + dco_decode_struct_with_field_rename_twin_normal(dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_struct_with_field_rename_twin_rust_async(dynamic raw); + + @protected + StructWithFieldRenameTwinSync dco_decode_struct_with_field_rename_twin_sync( + dynamic raw); + @protected StructWithGoodAndOpaqueFieldTwinNormal dco_decode_struct_with_good_and_opaque_field_twin_normal(dynamic raw); @@ -6732,6 +6784,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_struct_with_custom_name_method_twin_normal( SseDeserializer deserializer); + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer); + @protected StructWithEnumTwinNormal sse_decode_box_autoadd_struct_with_enum_twin_normal( SseDeserializer deserializer); @@ -6760,6 +6827,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync( SseDeserializer deserializer); + @protected + StructWithFieldRenameTwinNormal + sse_decode_box_autoadd_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSync + sse_decode_box_autoadd_struct_with_field_rename_twin_sync( + SseDeserializer deserializer); + @protected StructWithGoodAndOpaqueFieldTwinNormal sse_decode_box_autoadd_struct_with_good_and_opaque_field_twin_normal( @@ -8859,6 +8941,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_struct_with_custom_name_method_twin_normal( SseDeserializer deserializer); + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer); + @protected StructWithEnumTwinNormal sse_decode_struct_with_enum_twin_normal( SseDeserializer deserializer); @@ -8886,6 +8983,20 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_struct_with_explicit_auto_opaque_field_twin_sync( SseDeserializer deserializer); + @protected + StructWithFieldRenameTwinNormal + sse_decode_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSync sse_decode_struct_with_field_rename_twin_sync( + SseDeserializer deserializer); + @protected StructWithGoodAndOpaqueFieldTwinNormal sse_decode_struct_with_good_and_opaque_field_twin_normal( @@ -11302,6 +11413,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_struct_with_custom_name_method_twin_normal( StructWithCustomNameMethodTwinNormal self, SseSerializer serializer); + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer); @@ -11330,6 +11453,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync( StructWithExplicitAutoOpaqueFieldTwinSync self, SseSerializer serializer); + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_good_and_opaque_field_twin_normal( StructWithGoodAndOpaqueFieldTwinNormal self, SseSerializer serializer); @@ -13373,6 +13508,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_struct_with_custom_name_method_twin_normal( StructWithCustomNameMethodTwinNormal self, SseSerializer serializer); + @protected + void sse_encode_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer); + @protected void sse_encode_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer); @@ -13399,6 +13546,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_struct_with_explicit_auto_opaque_field_twin_sync( StructWithExplicitAutoOpaqueFieldTwinSync self, SseSerializer serializer); + @protected + void sse_encode_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer); + @protected void sse_encode_struct_with_good_and_opaque_field_twin_normal( StructWithGoodAndOpaqueFieldTwinNormal self, SseSerializer serializer); diff --git a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.web.dart b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.web.dart index f060498904..59f8b4f690 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.web.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.web.dart @@ -2484,6 +2484,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_box_autoadd_struct_with_custom_name_method_twin_normal( dynamic raw); + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + dynamic raw); + @protected StructWithEnumTwinNormal dco_decode_box_autoadd_struct_with_enum_twin_normal( dynamic raw); @@ -2511,6 +2526,19 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dco_decode_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync( dynamic raw); + @protected + StructWithFieldRenameTwinNormal + dco_decode_box_autoadd_struct_with_field_rename_twin_normal(dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + dynamic raw); + + @protected + StructWithFieldRenameTwinSync + dco_decode_box_autoadd_struct_with_field_rename_twin_sync(dynamic raw); + @protected StructWithGoodAndOpaqueFieldTwinNormal dco_decode_box_autoadd_struct_with_good_and_opaque_field_twin_normal( @@ -4350,6 +4378,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithCustomNameMethodTwinNormal dco_decode_struct_with_custom_name_method_twin_normal(dynamic raw); + @protected + StructWithDartKeywordFieldTwinNormal + dco_decode_struct_with_dart_keyword_field_twin_normal(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinRustAsync + dco_decode_struct_with_dart_keyword_field_twin_rust_async(dynamic raw); + + @protected + StructWithDartKeywordFieldTwinSync + dco_decode_struct_with_dart_keyword_field_twin_sync(dynamic raw); + @protected StructWithEnumTwinNormal dco_decode_struct_with_enum_twin_normal(dynamic raw); @@ -4374,6 +4414,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { StructWithExplicitAutoOpaqueFieldTwinSync dco_decode_struct_with_explicit_auto_opaque_field_twin_sync(dynamic raw); + @protected + StructWithFieldRenameTwinNormal + dco_decode_struct_with_field_rename_twin_normal(dynamic raw); + + @protected + StructWithFieldRenameTwinRustAsync + dco_decode_struct_with_field_rename_twin_rust_async(dynamic raw); + + @protected + StructWithFieldRenameTwinSync dco_decode_struct_with_field_rename_twin_sync( + dynamic raw); + @protected StructWithGoodAndOpaqueFieldTwinNormal dco_decode_struct_with_good_and_opaque_field_twin_normal(dynamic raw); @@ -6734,6 +6786,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_struct_with_custom_name_method_twin_normal( SseDeserializer deserializer); + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer); + @protected StructWithEnumTwinNormal sse_decode_box_autoadd_struct_with_enum_twin_normal( SseDeserializer deserializer); @@ -6762,6 +6829,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync( SseDeserializer deserializer); + @protected + StructWithFieldRenameTwinNormal + sse_decode_box_autoadd_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_box_autoadd_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSync + sse_decode_box_autoadd_struct_with_field_rename_twin_sync( + SseDeserializer deserializer); + @protected StructWithGoodAndOpaqueFieldTwinNormal sse_decode_box_autoadd_struct_with_good_and_opaque_field_twin_normal( @@ -8861,6 +8943,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_struct_with_custom_name_method_twin_normal( SseDeserializer deserializer); + @protected + StructWithDartKeywordFieldTwinNormal + sse_decode_struct_with_dart_keyword_field_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinRustAsync + sse_decode_struct_with_dart_keyword_field_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithDartKeywordFieldTwinSync + sse_decode_struct_with_dart_keyword_field_twin_sync( + SseDeserializer deserializer); + @protected StructWithEnumTwinNormal sse_decode_struct_with_enum_twin_normal( SseDeserializer deserializer); @@ -8888,6 +8985,20 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { sse_decode_struct_with_explicit_auto_opaque_field_twin_sync( SseDeserializer deserializer); + @protected + StructWithFieldRenameTwinNormal + sse_decode_struct_with_field_rename_twin_normal( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinRustAsync + sse_decode_struct_with_field_rename_twin_rust_async( + SseDeserializer deserializer); + + @protected + StructWithFieldRenameTwinSync sse_decode_struct_with_field_rename_twin_sync( + SseDeserializer deserializer); + @protected StructWithGoodAndOpaqueFieldTwinNormal sse_decode_struct_with_good_and_opaque_field_twin_normal( @@ -11304,6 +11415,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_struct_with_custom_name_method_twin_normal( StructWithCustomNameMethodTwinNormal self, SseSerializer serializer); + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer); @@ -11332,6 +11455,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_struct_with_explicit_auto_opaque_field_twin_sync( StructWithExplicitAutoOpaqueFieldTwinSync self, SseSerializer serializer); + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_struct_with_good_and_opaque_field_twin_normal( StructWithGoodAndOpaqueFieldTwinNormal self, SseSerializer serializer); @@ -13375,6 +13510,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_struct_with_custom_name_method_twin_normal( StructWithCustomNameMethodTwinNormal self, SseSerializer serializer); + @protected + void sse_encode_struct_with_dart_keyword_field_twin_normal( + StructWithDartKeywordFieldTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_rust_async( + StructWithDartKeywordFieldTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_dart_keyword_field_twin_sync( + StructWithDartKeywordFieldTwinSync self, SseSerializer serializer); + @protected void sse_encode_struct_with_enum_twin_normal( StructWithEnumTwinNormal self, SseSerializer serializer); @@ -13401,6 +13548,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_struct_with_explicit_auto_opaque_field_twin_sync( StructWithExplicitAutoOpaqueFieldTwinSync self, SseSerializer serializer); + @protected + void sse_encode_struct_with_field_rename_twin_normal( + StructWithFieldRenameTwinNormal self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_rust_async( + StructWithFieldRenameTwinRustAsync self, SseSerializer serializer); + + @protected + void sse_encode_struct_with_field_rename_twin_sync( + StructWithFieldRenameTwinSync self, SseSerializer serializer); + @protected void sse_encode_struct_with_good_and_opaque_field_twin_normal( StructWithGoodAndOpaqueFieldTwinNormal self, SseSerializer serializer); diff --git a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/structure_twin_rust_async.rs b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/structure_twin_rust_async.rs index 984c4a0f87..8f56d9d29e 100644 --- a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/structure_twin_rust_async.rs +++ b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/structure_twin_rust_async.rs @@ -4,6 +4,8 @@ // AUTO-GENERATED FROM frb_example/pure_dart, DO NOT EDIT +use flutter_rust_bridge::frb; + pub struct StructWithZeroFieldTwinRustAsync {} pub async fn func_struct_with_zero_field_twin_rust_async( @@ -48,3 +50,26 @@ pub async fn func_tuple_struct_with_two_field_twin_rust_async( ) -> TupleStructWithTwoFieldTwinRustAsync { arg } + +#[frb] +pub struct StructWithFieldRenameTwinRustAsync { + #[frb(name = "renamed_field")] + pub class: i32, +} + +pub async fn func_for_struct_with_field_rename_twin_rust_async( + arg: StructWithFieldRenameTwinRustAsync, +) -> StructWithFieldRenameTwinRustAsync { + arg +} + +pub struct StructWithDartKeywordFieldTwinRustAsync { + pub class: i32, + pub interface: i64, +} + +pub async fn func_for_struct_with_dart_keyword_field_twin_rust_async( + arg: StructWithDartKeywordFieldTwinRustAsync, +) -> StructWithDartKeywordFieldTwinRustAsync { + arg +} diff --git a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/structure_twin_sync.rs b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/structure_twin_sync.rs index ec56c339d2..2751e8dc5d 100644 --- a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/structure_twin_sync.rs +++ b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/structure_twin_sync.rs @@ -4,6 +4,8 @@ // AUTO-GENERATED FROM frb_example/pure_dart, DO NOT EDIT +use flutter_rust_bridge::frb; + pub struct StructWithZeroFieldTwinSync {} #[flutter_rust_bridge::frb(sync)] @@ -53,3 +55,28 @@ pub fn func_tuple_struct_with_two_field_twin_sync( ) -> TupleStructWithTwoFieldTwinSync { arg } + +#[frb] +pub struct StructWithFieldRenameTwinSync { + #[frb(name = "renamed_field")] + pub class: i32, +} + +#[flutter_rust_bridge::frb(sync)] +pub fn func_for_struct_with_field_rename_twin_sync( + arg: StructWithFieldRenameTwinSync, +) -> StructWithFieldRenameTwinSync { + arg +} + +pub struct StructWithDartKeywordFieldTwinSync { + pub class: i32, + pub interface: i64, +} + +#[flutter_rust_bridge::frb(sync)] +pub fn func_for_struct_with_dart_keyword_field_twin_sync( + arg: StructWithDartKeywordFieldTwinSync, +) -> StructWithDartKeywordFieldTwinSync { + arg +} diff --git a/frb_example/pure_dart_pde/rust/src/api/structure.rs b/frb_example/pure_dart_pde/rust/src/api/structure.rs index 0e0873e905..289dca2751 100644 --- a/frb_example/pure_dart_pde/rust/src/api/structure.rs +++ b/frb_example/pure_dart_pde/rust/src/api/structure.rs @@ -1,5 +1,7 @@ // AUTO-GENERATED FROM frb_example/pure_dart, DO NOT EDIT +use flutter_rust_bridge::frb; + pub struct StructWithZeroFieldTwinNormal {} pub fn func_struct_with_zero_field_twin_normal( @@ -44,3 +46,26 @@ pub fn func_tuple_struct_with_two_field_twin_normal( ) -> TupleStructWithTwoFieldTwinNormal { arg } + +#[frb] +pub struct StructWithFieldRenameTwinNormal { + #[frb(name = "renamed_field")] + pub class: i32, +} + +pub fn func_for_struct_with_field_rename_twin_normal( + arg: StructWithFieldRenameTwinNormal, +) -> StructWithFieldRenameTwinNormal { + arg +} + +pub struct StructWithDartKeywordFieldTwinNormal { + pub class: i32, + pub interface: i64, +} + +pub fn func_for_struct_with_dart_keyword_field_twin_normal( + arg: StructWithDartKeywordFieldTwinNormal, +) -> StructWithDartKeywordFieldTwinNormal { + arg +} diff --git a/frb_example/pure_dart_pde/rust/src/frb_generated.rs b/frb_example/pure_dart_pde/rust/src/frb_generated.rs index 22e17ff107..497396ba36 100644 --- a/frb_example/pure_dart_pde/rust/src/frb_generated.rs +++ b/frb_example/pure_dart_pde/rust/src/frb_generated.rs @@ -59,7 +59,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_auto_opaque = RustAutoOpaqueMoi, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.38"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -409428289; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -263748021; // Section: executor @@ -24235,6 +24235,36 @@ fn wire__crate__api__pseudo_manual__stream_twin_rust_async__stream_sink_inside_v })().await) } }) } +fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_dart_keyword_field_twin_rust_async", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { + let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode(&mut deserializer);deserializer.end(); move |context| async move { + transform_result_sse((move || async move { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_rust_async::func_for_struct_with_dart_keyword_field_twin_rust_async(api_arg).await) + })().await) + } }) +} +fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_field_rename_twin_rust_async", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { + let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode(&mut deserializer);deserializer.end(); move |context| async move { + transform_result_sse((move || async move { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_rust_async::func_for_struct_with_field_rename_twin_rust_async(api_arg).await) + })().await) + } }) +} fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_one_field_twin_rust_async_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, @@ -24310,6 +24340,32 @@ fn wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct })().await) } }) } +fn wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_dart_keyword_field_twin_sync", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { + let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode(&mut deserializer);deserializer.end(); + transform_result_sse((move || { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_sync::func_for_struct_with_dart_keyword_field_twin_sync(api_arg)) + })()) }) +} +fn wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "func_for_struct_with_field_rename_twin_sync", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { + let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode(&mut deserializer);deserializer.end(); + transform_result_sse((move || { + Result::<_,()>::Ok(crate::api::pseudo_manual::structure_twin_sync::func_for_struct_with_field_rename_twin_sync(api_arg)) + })()) }) +} fn wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_one_field_twin_sync_impl( ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, rust_vec_len_: i32, @@ -27201,6 +27257,82 @@ fn wire__crate__api__stream_misc__stream_sink_dart_async_twin_normal_impl( }, ) } +fn wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "func_for_struct_with_dart_keyword_field_twin_normal", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode( + &mut deserializer, + ); + deserializer.end(); + move |context| { + transform_result_sse((move || { + Result::<_, ()>::Ok( + crate::api::structure::func_for_struct_with_dart_keyword_field_twin_normal( + api_arg, + ), + ) + })()) + } + }, + ) +} +fn wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "func_for_struct_with_field_rename_twin_normal", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_arg = ::sse_decode( + &mut deserializer, + ); + deserializer.end(); + move |context| { + transform_result_sse((move || { + Result::<_, ()>::Ok( + crate::api::structure::func_for_struct_with_field_rename_twin_normal( + api_arg, + ), + ) + })()) + } + }, + ) +} fn wire__crate__api__structure__func_struct_with_one_field_twin_normal_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, @@ -35492,12 +35624,12 @@ impl SseDecode for crate::api::raw_string::MoreThanJustOneRawStringStructTwinNor fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_regular = ::sse_decode(deserializer); let mut var_type = ::sse_decode(deserializer); - let mut var_async = ::sse_decode(deserializer); + let mut var_async_ = ::sse_decode(deserializer); let mut var_another = ::sse_decode(deserializer); return crate::api::raw_string::MoreThanJustOneRawStringStructTwinNormal { regular: var_regular, r#type: var_type, - r#async: var_async, + r#async: var_async_, another: var_another, }; } @@ -35507,9 +35639,9 @@ impl SseDecode for crate::api::pseudo_manual::raw_string_twin_rust_async::MoreTh // 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_regular = ::sse_decode(deserializer); let mut var_type = ::sse_decode(deserializer); -let mut var_async = ::sse_decode(deserializer); +let mut var_async_ = ::sse_decode(deserializer); let mut var_another = ::sse_decode(deserializer); -return crate::api::pseudo_manual::raw_string_twin_rust_async::MoreThanJustOneRawStringStructTwinRustAsync{regular: var_regular, r#type: var_type, r#async: var_async, another: var_another};} +return crate::api::pseudo_manual::raw_string_twin_rust_async::MoreThanJustOneRawStringStructTwinRustAsync{regular: var_regular, r#type: var_type, r#async: var_async_, another: var_another};} } impl SseDecode @@ -35519,9 +35651,9 @@ impl SseDecode fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_regular = ::sse_decode(deserializer); let mut var_type = ::sse_decode(deserializer); - let mut var_async = ::sse_decode(deserializer); + let mut var_async_ = ::sse_decode(deserializer); let mut var_another = ::sse_decode(deserializer); - return crate::api::pseudo_manual::raw_string_twin_sync::MoreThanJustOneRawStringStructTwinSync{regular: var_regular, r#type: var_type, r#async: var_async, another: var_another}; + return crate::api::pseudo_manual::raw_string_twin_sync::MoreThanJustOneRawStringStructTwinSync{regular: var_regular, r#type: var_type, r#async: var_async_, another: var_another}; } } @@ -37935,6 +38067,36 @@ impl SseDecode for crate::api::misc_no_twin_example_a::StructWithCustomNameMetho } } +impl SseDecode for crate::api::structure::StructWithDartKeywordFieldTwinNormal { + // 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_class_ = ::sse_decode(deserializer); + let mut var_interface_ = ::sse_decode(deserializer); + return crate::api::structure::StructWithDartKeywordFieldTwinNormal { + class: var_class_, + interface: var_interface_, + }; + } +} + +impl SseDecode for crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + // 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_class_ = ::sse_decode(deserializer); +let mut var_interface_ = ::sse_decode(deserializer); +return crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync{class: var_class_, interface: var_interface_};} + } + +impl SseDecode + for crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync +{ + // 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_class_ = ::sse_decode(deserializer); + let mut var_interface_ = ::sse_decode(deserializer); + return crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync{class: var_class_, interface: var_interface_}; + } +} + impl SseDecode for crate::api::misc_example::StructWithEnumTwinNormal { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -38009,6 +38171,36 @@ let mut var_normal = ::sse_decode(deserializer); return crate::api::pseudo_manual::rust_auto_opaque_twin_sync::StructWithExplicitAutoOpaqueFieldTwinSync{auto_opaque: var_autoOpaque, normal: var_normal};} } +impl SseDecode for crate::api::structure::StructWithFieldRenameTwinNormal { + // 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_renamed_field = ::sse_decode(deserializer); + return crate::api::structure::StructWithFieldRenameTwinNormal { + class: var_renamed_field, + }; + } +} + +impl SseDecode + for crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync +{ + // 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_renamed_field = ::sse_decode(deserializer); + return crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync{class: var_renamed_field}; + } +} + +impl SseDecode for crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + // 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_renamed_field = ::sse_decode(deserializer); + return crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + class: var_renamed_field, + }; + } +} + impl SseDecode for crate::api::rust_auto_opaque::StructWithGoodAndOpaqueFieldTwinNormal { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -39375,106 +39567,110 @@ fn pde_ffi_dispatcher_primary_impl( 1091 => wire__crate__api__pseudo_manual__stream_twin_rust_async__stream_sink_fixed_sized_primitive_array_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), 1092 => wire__crate__api__pseudo_manual__stream_twin_rust_async__stream_sink_inside_struct_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), 1093 => wire__crate__api__pseudo_manual__stream_twin_rust_async__stream_sink_inside_vec_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1094 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_one_field_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1095 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_two_field_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1096 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_zero_field_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1097 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct_with_one_field_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1098 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct_with_two_field_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1104 => wire__crate__api__pseudo_manual__tuple_twin_rust_async__test_tuple_2_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1105 => wire__crate__api__pseudo_manual__tuple_twin_rust_async__test_tuple_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1108 => wire__crate__api__pseudo_manual__type_alias_twin_rust_async__handle_type_alias_id_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1109 => wire__crate__api__pseudo_manual__type_alias_twin_rust_async__handle_type_alias_model_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1110 => wire__crate__api__pseudo_manual__type_alias_twin_rust_async__handle_type_nest_alias_id_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1114 => wire__crate__api__pseudo_manual__uuid_type_twin_rust_async__handle_nested_uuids_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1115 => wire__crate__api__pseudo_manual__uuid_type_twin_rust_async__handle_uuid_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1116 => wire__crate__api__pseudo_manual__uuid_type_twin_rust_async__handle_uuids_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), -1120 => wire__crate__api__raw_string__test_more_than_just_one_raw_string_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1121 => wire__crate__api__raw_string__test_raw_string_item_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1122 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_instance_method_arg_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1123 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_instance_method_arg_mut_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1124 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_instance_method_arg_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1125 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_instance_method_getter_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1126 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_instance_method_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1127 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_new_custom_name_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1128 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_new_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1129 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_new_with_result_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1130 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_static_method_arg_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1131 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_static_method_arg_mut_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1132 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_static_method_arg_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1133 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_static_method_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1137 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_arg_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1138 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_arg_mut_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1139 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_arg_own_and_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1140 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_arg_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1141 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_arg_vec_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1142 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_borrow_and_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1143 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_borrow_and_mut_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1144 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_callable_arg_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1145 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_callable_return_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1146 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_dummy_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1147 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_enum_arg_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1148 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_enum_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1149 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_enum_with_good_and_opaque_arg_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1150 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_enum_with_good_and_opaque_return_own_good_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1151 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_enum_with_good_and_opaque_return_own_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1152 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_explicit_arg_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1153 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_explicit_return_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1154 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_explicit_return_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1155 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_explicit_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1156 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_normal_and_opaque_arg_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1157 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_plus_sign_arg_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1158 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_plus_sign_return_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1159 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_return_opaque_one_and_two_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1160 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_return_opaque_two_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1161 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1162 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_return_vec_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1163 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_sleep_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1164 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_stream_sink_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1165 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1166 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1167 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_two_args_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1168 => wire__crate__api__rust_opaque__create_array_opaque_enum_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1169 => wire__crate__api__rust_opaque__create_nested_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1170 => wire__crate__api__rust_opaque__create_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1171 => wire__crate__api__rust_opaque__create_option_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1172 => wire__crate__api__rust_opaque__frb_generator_test_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1173 => wire__crate__api__rust_opaque__opaque_array_run_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1174 => wire__crate__api__rust_opaque__opaque_array_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1175 => wire__crate__api__rust_opaque__opaque_vec_run_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1176 => wire__crate__api__rust_opaque__opaque_vec_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1177 => wire__crate__api__rust_opaque__run_enum_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1178 => wire__crate__api__rust_opaque__run_nested_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1179 => wire__crate__api__rust_opaque__run_non_clone_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1180 => wire__crate__api__rust_opaque__run_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1181 => wire__crate__api__rust_opaque__run_opaque_with_delay_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1182 => wire__crate__api__rust_opaque__unwrap_rust_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1187 => wire__crate__api__simple__simple_adder_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1188 => wire__crate__api__stream__func_stream_add_value_and_error_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1189 => wire__crate__api__stream__func_stream_return_error_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1190 => wire__crate__api__stream__func_stream_return_panic_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1191 => wire__crate__api__stream__func_stream_sink_arg_position_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1192 => wire__crate__api__stream__handle_stream_of_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1193 => wire__crate__api__stream__handle_stream_sink_at_1_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1194 => wire__crate__api__stream__handle_stream_sink_at_2_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1195 => wire__crate__api__stream__handle_stream_sink_at_3_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1196 => wire__crate__api__stream__stream_sink_fixed_sized_primitive_array_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1197 => wire__crate__api__stream__stream_sink_inside_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1198 => wire__crate__api__stream__stream_sink_inside_vec_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1199 => wire__crate__api__stream_misc__func_stream_realistic_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1200 => wire__crate__api__stream_misc__stream_sink_dart_async_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1201 => wire__crate__api__structure__func_struct_with_one_field_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1202 => wire__crate__api__structure__func_struct_with_two_field_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1203 => wire__crate__api__structure__func_struct_with_zero_field_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1204 => wire__crate__api__structure__func_tuple_struct_with_one_field_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1205 => wire__crate__api__structure__func_tuple_struct_with_two_field_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1206 => wire__crate__api__tuple__test_tuple_2_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1207 => wire__crate__api__tuple__test_tuple_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1208 => wire__crate__api__type_alias__handle_type_alias_id_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1209 => wire__crate__api__type_alias__handle_type_alias_model_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1210 => wire__crate__api__type_alias__handle_type_nest_alias_id_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1211 => wire__crate__api__uuid_type__handle_nested_uuids_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1212 => wire__crate__api__uuid_type__handle_uuid_twin_normal_impl(port, ptr, rust_vec_len, data_len), -1213 => wire__crate__api__uuid_type__handle_uuids_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1094 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_dart_keyword_field_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1095 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_for_struct_with_field_rename_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1096 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_one_field_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1097 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_two_field_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1098 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_struct_with_zero_field_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1099 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct_with_one_field_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1100 => wire__crate__api__pseudo_manual__structure_twin_rust_async__func_tuple_struct_with_two_field_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1108 => wire__crate__api__pseudo_manual__tuple_twin_rust_async__test_tuple_2_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1109 => wire__crate__api__pseudo_manual__tuple_twin_rust_async__test_tuple_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1112 => wire__crate__api__pseudo_manual__type_alias_twin_rust_async__handle_type_alias_id_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1113 => wire__crate__api__pseudo_manual__type_alias_twin_rust_async__handle_type_alias_model_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1114 => wire__crate__api__pseudo_manual__type_alias_twin_rust_async__handle_type_nest_alias_id_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1118 => wire__crate__api__pseudo_manual__uuid_type_twin_rust_async__handle_nested_uuids_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1119 => wire__crate__api__pseudo_manual__uuid_type_twin_rust_async__handle_uuid_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1120 => wire__crate__api__pseudo_manual__uuid_type_twin_rust_async__handle_uuids_twin_rust_async_impl(port, ptr, rust_vec_len, data_len), +1124 => wire__crate__api__raw_string__test_more_than_just_one_raw_string_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1125 => wire__crate__api__raw_string__test_raw_string_item_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1126 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_instance_method_arg_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1127 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_instance_method_arg_mut_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1128 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_instance_method_arg_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1129 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_instance_method_getter_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1130 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_instance_method_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1131 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_new_custom_name_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1132 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_new_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1133 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_new_with_result_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1134 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_static_method_arg_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1135 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_static_method_arg_mut_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1136 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_static_method_arg_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1137 => wire__crate__api__rust_auto_opaque__NonCloneSimpleTwinNormal_static_method_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1141 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_arg_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1142 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_arg_mut_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1143 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_arg_own_and_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1144 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_arg_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1145 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_arg_vec_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1146 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_borrow_and_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1147 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_borrow_and_mut_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1148 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_callable_arg_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1149 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_callable_return_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1150 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_dummy_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1151 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_enum_arg_borrow_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1152 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_enum_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1153 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_enum_with_good_and_opaque_arg_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1154 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_enum_with_good_and_opaque_return_own_good_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1155 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_enum_with_good_and_opaque_return_own_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1156 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_explicit_arg_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1157 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_explicit_return_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1158 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_explicit_return_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1159 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_explicit_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1160 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_normal_and_opaque_arg_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1161 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_plus_sign_arg_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1162 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_plus_sign_return_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1163 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_return_opaque_one_and_two_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1164 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_return_opaque_two_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1165 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1166 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_return_vec_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1167 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_sleep_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1168 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_stream_sink_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1169 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1170 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1171 => wire__crate__api__rust_auto_opaque__rust_auto_opaque_two_args_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1172 => wire__crate__api__rust_opaque__create_array_opaque_enum_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1173 => wire__crate__api__rust_opaque__create_nested_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1174 => wire__crate__api__rust_opaque__create_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1175 => wire__crate__api__rust_opaque__create_option_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1176 => wire__crate__api__rust_opaque__frb_generator_test_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1177 => wire__crate__api__rust_opaque__opaque_array_run_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1178 => wire__crate__api__rust_opaque__opaque_array_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1179 => wire__crate__api__rust_opaque__opaque_vec_run_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1180 => wire__crate__api__rust_opaque__opaque_vec_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1181 => wire__crate__api__rust_opaque__run_enum_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1182 => wire__crate__api__rust_opaque__run_nested_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1183 => wire__crate__api__rust_opaque__run_non_clone_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1184 => wire__crate__api__rust_opaque__run_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1185 => wire__crate__api__rust_opaque__run_opaque_with_delay_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1186 => wire__crate__api__rust_opaque__unwrap_rust_opaque_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1191 => wire__crate__api__simple__simple_adder_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1192 => wire__crate__api__stream__func_stream_add_value_and_error_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1193 => wire__crate__api__stream__func_stream_return_error_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1194 => wire__crate__api__stream__func_stream_return_panic_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1195 => wire__crate__api__stream__func_stream_sink_arg_position_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1196 => wire__crate__api__stream__handle_stream_of_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1197 => wire__crate__api__stream__handle_stream_sink_at_1_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1198 => wire__crate__api__stream__handle_stream_sink_at_2_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1199 => wire__crate__api__stream__handle_stream_sink_at_3_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1200 => wire__crate__api__stream__stream_sink_fixed_sized_primitive_array_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1201 => wire__crate__api__stream__stream_sink_inside_struct_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1202 => wire__crate__api__stream__stream_sink_inside_vec_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1203 => wire__crate__api__stream_misc__func_stream_realistic_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1204 => wire__crate__api__stream_misc__stream_sink_dart_async_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1205 => wire__crate__api__structure__func_for_struct_with_dart_keyword_field_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1206 => wire__crate__api__structure__func_for_struct_with_field_rename_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1207 => wire__crate__api__structure__func_struct_with_one_field_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1208 => wire__crate__api__structure__func_struct_with_two_field_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1209 => wire__crate__api__structure__func_struct_with_zero_field_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1210 => wire__crate__api__structure__func_tuple_struct_with_one_field_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1211 => wire__crate__api__structure__func_tuple_struct_with_two_field_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1212 => wire__crate__api__tuple__test_tuple_2_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1213 => wire__crate__api__tuple__test_tuple_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1214 => wire__crate__api__type_alias__handle_type_alias_id_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1215 => wire__crate__api__type_alias__handle_type_alias_model_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1216 => wire__crate__api__type_alias__handle_type_nest_alias_id_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1217 => wire__crate__api__uuid_type__handle_nested_uuids_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1218 => wire__crate__api__uuid_type__handle_uuid_twin_normal_impl(port, ptr, rust_vec_len, data_len), +1219 => wire__crate__api__uuid_type__handle_uuids_twin_normal_impl(port, ptr, rust_vec_len, data_len), _ => unreachable!(), } } @@ -39870,25 +40066,27 @@ fn pde_ffi_dispatcher_sync_impl( 1079 => wire__crate__api__pseudo_manual__rust_opaque_twin_sync__run_opaque_with_delay_twin_sync_impl(ptr, rust_vec_len, data_len), 1080 => wire__crate__api__pseudo_manual__rust_opaque_twin_sync__unwrap_rust_opaque_twin_sync_impl(ptr, rust_vec_len, data_len), 1082 => wire__crate__api__pseudo_manual__simple_twin_sync__simple_adder_twin_sync_impl(ptr, rust_vec_len, data_len), -1099 => wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_one_field_twin_sync_impl(ptr, rust_vec_len, data_len), -1100 => wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_two_field_twin_sync_impl(ptr, rust_vec_len, data_len), -1101 => wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_zero_field_twin_sync_impl(ptr, rust_vec_len, data_len), -1102 => wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_one_field_twin_sync_impl(ptr, rust_vec_len, data_len), -1103 => wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_two_field_twin_sync_impl(ptr, rust_vec_len, data_len), -1106 => wire__crate__api__pseudo_manual__tuple_twin_sync__test_tuple_2_twin_sync_impl(ptr, rust_vec_len, data_len), -1107 => wire__crate__api__pseudo_manual__tuple_twin_sync__test_tuple_twin_sync_impl(ptr, rust_vec_len, data_len), -1111 => wire__crate__api__pseudo_manual__type_alias_twin_sync__handle_type_alias_id_twin_sync_impl(ptr, rust_vec_len, data_len), -1112 => wire__crate__api__pseudo_manual__type_alias_twin_sync__handle_type_alias_model_twin_sync_impl(ptr, rust_vec_len, data_len), -1113 => wire__crate__api__pseudo_manual__type_alias_twin_sync__handle_type_nest_alias_id_twin_sync_impl(ptr, rust_vec_len, data_len), -1117 => wire__crate__api__pseudo_manual__uuid_type_twin_sync__handle_nested_uuids_twin_sync_impl(ptr, rust_vec_len, data_len), -1118 => wire__crate__api__pseudo_manual__uuid_type_twin_sync__handle_uuid_twin_sync_impl(ptr, rust_vec_len, data_len), -1119 => wire__crate__api__pseudo_manual__uuid_type_twin_sync__handle_uuids_twin_sync_impl(ptr, rust_vec_len, data_len), -1134 => wire__crate__api__rust_auto_opaque__StructWithGoodAndOpaqueFieldWithoutOptionTwinNormal_get_good_impl(ptr, rust_vec_len, data_len), -1135 => wire__crate__api__rust_auto_opaque__StructWithGoodAndOpaqueFieldWithoutOptionTwinNormal_set_good_impl(ptr, rust_vec_len, data_len), -1183 => wire__crate__api__rust_opaque_sync__frb_sync_generator_test_twin_normal_impl(ptr, rust_vec_len, data_len), -1184 => wire__crate__api__rust_opaque_sync__sync_create_non_clone_twin_normal_impl(ptr, rust_vec_len, data_len), -1185 => wire__crate__api__rust_opaque_sync__sync_create_opaque_twin_normal_impl(ptr, rust_vec_len, data_len), -1186 => wire__crate__api__rust_opaque_sync__sync_option_rust_opaque_twin_normal_impl(ptr, rust_vec_len, data_len), +1101 => wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_dart_keyword_field_twin_sync_impl(ptr, rust_vec_len, data_len), +1102 => wire__crate__api__pseudo_manual__structure_twin_sync__func_for_struct_with_field_rename_twin_sync_impl(ptr, rust_vec_len, data_len), +1103 => wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_one_field_twin_sync_impl(ptr, rust_vec_len, data_len), +1104 => wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_two_field_twin_sync_impl(ptr, rust_vec_len, data_len), +1105 => wire__crate__api__pseudo_manual__structure_twin_sync__func_struct_with_zero_field_twin_sync_impl(ptr, rust_vec_len, data_len), +1106 => wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_one_field_twin_sync_impl(ptr, rust_vec_len, data_len), +1107 => wire__crate__api__pseudo_manual__structure_twin_sync__func_tuple_struct_with_two_field_twin_sync_impl(ptr, rust_vec_len, data_len), +1110 => wire__crate__api__pseudo_manual__tuple_twin_sync__test_tuple_2_twin_sync_impl(ptr, rust_vec_len, data_len), +1111 => wire__crate__api__pseudo_manual__tuple_twin_sync__test_tuple_twin_sync_impl(ptr, rust_vec_len, data_len), +1115 => wire__crate__api__pseudo_manual__type_alias_twin_sync__handle_type_alias_id_twin_sync_impl(ptr, rust_vec_len, data_len), +1116 => wire__crate__api__pseudo_manual__type_alias_twin_sync__handle_type_alias_model_twin_sync_impl(ptr, rust_vec_len, data_len), +1117 => wire__crate__api__pseudo_manual__type_alias_twin_sync__handle_type_nest_alias_id_twin_sync_impl(ptr, rust_vec_len, data_len), +1121 => wire__crate__api__pseudo_manual__uuid_type_twin_sync__handle_nested_uuids_twin_sync_impl(ptr, rust_vec_len, data_len), +1122 => wire__crate__api__pseudo_manual__uuid_type_twin_sync__handle_uuid_twin_sync_impl(ptr, rust_vec_len, data_len), +1123 => wire__crate__api__pseudo_manual__uuid_type_twin_sync__handle_uuids_twin_sync_impl(ptr, rust_vec_len, data_len), +1138 => wire__crate__api__rust_auto_opaque__StructWithGoodAndOpaqueFieldWithoutOptionTwinNormal_get_good_impl(ptr, rust_vec_len, data_len), +1139 => wire__crate__api__rust_auto_opaque__StructWithGoodAndOpaqueFieldWithoutOptionTwinNormal_set_good_impl(ptr, rust_vec_len, data_len), +1187 => wire__crate__api__rust_opaque_sync__frb_sync_generator_test_twin_normal_impl(ptr, rust_vec_len, data_len), +1188 => wire__crate__api__rust_opaque_sync__sync_create_non_clone_twin_normal_impl(ptr, rust_vec_len, data_len), +1189 => wire__crate__api__rust_opaque_sync__sync_create_opaque_twin_normal_impl(ptr, rust_vec_len, data_len), +1190 => wire__crate__api__rust_opaque_sync__sync_option_rust_opaque_twin_normal_impl(ptr, rust_vec_len, data_len), _ => unreachable!(), } } @@ -46601,6 +46799,69 @@ impl } } // Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::structure::StructWithDartKeywordFieldTwinNormal { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.class.into_into_dart().into_dart(), + self.interface.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::structure::StructWithDartKeywordFieldTwinNormal +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::structure::StructWithDartKeywordFieldTwinNormal +{ + fn into_into_dart(self) -> crate::api::structure::StructWithDartKeywordFieldTwinNormal { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.class.into_into_dart().into_dart(), +self.interface.into_into_dart().into_dart() + ].into_dart() + } + } +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + fn into_into_dart(self) -> crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + self + } + } +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.class.into_into_dart().into_dart(), + self.interface.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync, + > for crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync +{ + fn into_into_dart( + self, + ) -> crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::api::misc_example::StructWithEnumTwinNormal { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ @@ -46733,6 +46994,70 @@ impl flutter_rust_bridge::IntoIntoDart flutter_rust_bridge::for_generated::DartAbi { + [self.class.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::structure::StructWithFieldRenameTwinNormal +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::structure::StructWithFieldRenameTwinNormal +{ + fn into_into_dart(self) -> crate::api::structure::StructWithFieldRenameTwinNormal { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.class.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync, + > for crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync +{ + fn into_into_dart( + self, + ) -> crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync + { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart + for crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync +{ + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.class.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync +{ +} +impl + flutter_rust_bridge::IntoIntoDart< + crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync, + > for crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync +{ + fn into_into_dart( + self, + ) -> crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::api::rust_auto_opaque::StructWithGoodAndOpaqueFieldTwinNormal { @@ -55951,6 +56276,30 @@ impl SseEncode for crate::api::misc_no_twin_example_a::StructWithCustomNameMetho } } +impl SseEncode for crate::api::structure::StructWithDartKeywordFieldTwinNormal { + // 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.class, serializer); + ::sse_encode(self.interface, serializer); + } +} + +impl SseEncode for crate::api::pseudo_manual::structure_twin_rust_async::StructWithDartKeywordFieldTwinRustAsync { + // 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.class, serializer); +::sse_encode(self.interface, serializer);} + } + +impl SseEncode + for crate::api::pseudo_manual::structure_twin_sync::StructWithDartKeywordFieldTwinSync +{ + // 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.class, serializer); + ::sse_encode(self.interface, serializer); + } +} + impl SseEncode for crate::api::misc_example::StructWithEnumTwinNormal { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -56005,6 +56354,29 @@ impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_sync::Struct ::sse_encode(self.normal, serializer);} } +impl SseEncode for crate::api::structure::StructWithFieldRenameTwinNormal { + // 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.class, serializer); + } +} + +impl SseEncode + for crate::api::pseudo_manual::structure_twin_rust_async::StructWithFieldRenameTwinRustAsync +{ + // 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.class, serializer); + } +} + +impl SseEncode for crate::api::pseudo_manual::structure_twin_sync::StructWithFieldRenameTwinSync { + // 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.class, serializer); + } +} + impl SseEncode for crate::api::rust_auto_opaque::StructWithGoodAndOpaqueFieldTwinNormal { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { From 3a98deecee7f126de9ba9c39b9aec30ce5452364 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:50:16 +0800 Subject: [PATCH 33/36] chore: more --- .../pure_dart/test/api/external_type_in_crate_test.dart | 4 ++-- frb_example/pure_dart/test/api/mirror_test.dart | 4 ++-- frb_example/pure_dart/test/api/raw_string_test.dart | 2 +- frb_example/pure_dart/test/api/type_alias_test.dart | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frb_example/pure_dart/test/api/external_type_in_crate_test.dart b/frb_example/pure_dart/test/api/external_type_in_crate_test.dart index 453a5b8305..2af81273dd 100644 --- a/frb_example/pure_dart/test/api/external_type_in_crate_test.dart +++ b/frb_example/pure_dart/test/api/external_type_in_crate_test.dart @@ -19,11 +19,11 @@ Future main({bool skipRustLibInit = false}) async { test('dart call useImportedEnum()', () async { expect( - await useImportedEnumTwinNormal(myEnum: MyEnum.False), + await useImportedEnumTwinNormal(myEnum: MyEnum.false_), false, ); expect( - await useImportedEnumTwinNormal(myEnum: MyEnum.True), + await useImportedEnumTwinNormal(myEnum: MyEnum.true_), true, ); }); diff --git a/frb_example/pure_dart/test/api/mirror_test.dart b/frb_example/pure_dart/test/api/mirror_test.dart index d321b9c090..73d000775d 100644 --- a/frb_example/pure_dart/test/api/mirror_test.dart +++ b/frb_example/pure_dart/test/api/mirror_test.dart @@ -47,8 +47,8 @@ Future main({bool skipRustLibInit = false}) async { final ret = await mirrorStructStreamTwinNormal().first; _testAppSettings(ret.a); expect(ret.b.content, true); - expect(ret.c[0], MyEnum.True); - expect(ret.c[1], MyEnum.False); + expect(ret.c[0], MyEnum.true_); + expect(ret.c[1], MyEnum.false_); _testAppSettings(ret.d[0]); _testAppSettings(ret.d[1]); }); diff --git a/frb_example/pure_dart/test/api/raw_string_test.dart b/frb_example/pure_dart/test/api/raw_string_test.dart index f1fa05c763..25fae8717c 100644 --- a/frb_example/pure_dart/test/api/raw_string_test.dart +++ b/frb_example/pure_dart/test/api/raw_string_test.dart @@ -21,7 +21,7 @@ Future main({bool skipRustLibInit = false}) async { expect(output, isA()); expect(output.regular, "regular"); expect(output.type, "type"); - expect(output.async, true); + expect(output.async_, true); expect(output.another, "another"); }); } diff --git a/frb_example/pure_dart/test/api/type_alias_test.dart b/frb_example/pure_dart/test/api/type_alias_test.dart index e1ec27d3c3..322d8c2bce 100644 --- a/frb_example/pure_dart/test/api/type_alias_test.dart +++ b/frb_example/pure_dart/test/api/type_alias_test.dart @@ -18,10 +18,10 @@ Future main({bool skipRustLibInit = false}) async { test('dart call handle_type_model', () async { final testModel = - await handleTypeAliasModelTwinNormal(input: BigInt.from(42)); + await handleTypeAliasModelTwinNormal(input: BigInt.from(42)); expect(testModel.id.toInt(), 42); expect(testModel.name, "TestModel"); - expect(testModel.aliasEnum, MyEnum.False); + expect(testModel.aliasEnum, MyEnum.false_); expect(testModel.aliasStruct.content, true); }); } From 792ec40538dde9496823e88cc71d89f3e7704229 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 14:52:13 +0800 Subject: [PATCH 34/36] chore: more --- .../external_type_in_crate_twin_rust_async_sse_test.dart | 4 ++-- .../external_type_in_crate_twin_rust_async_test.dart | 4 ++-- .../pseudo_manual/external_type_in_crate_twin_sse_test.dart | 4 ++-- .../external_type_in_crate_twin_sync_sse_test.dart | 4 ++-- .../pseudo_manual/external_type_in_crate_twin_sync_test.dart | 4 ++-- .../api/pseudo_manual/mirror_twin_rust_async_sse_test.dart | 4 ++-- .../test/api/pseudo_manual/mirror_twin_rust_async_test.dart | 4 ++-- .../test/api/pseudo_manual/mirror_twin_sse_test.dart | 4 ++-- .../test/api/pseudo_manual/mirror_twin_sync_sse_test.dart | 4 ++-- .../test/api/pseudo_manual/mirror_twin_sync_test.dart | 4 ++-- .../pseudo_manual/raw_string_twin_rust_async_sse_test.dart | 2 +- .../api/pseudo_manual/raw_string_twin_rust_async_test.dart | 2 +- .../test/api/pseudo_manual/raw_string_twin_sse_test.dart | 2 +- .../test/api/pseudo_manual/raw_string_twin_sync_sse_test.dart | 2 +- .../test/api/pseudo_manual/raw_string_twin_sync_test.dart | 2 +- .../pseudo_manual/type_alias_twin_rust_async_sse_test.dart | 2 +- .../api/pseudo_manual/type_alias_twin_rust_async_test.dart | 2 +- .../test/api/pseudo_manual/type_alias_twin_sse_test.dart | 2 +- .../test/api/pseudo_manual/type_alias_twin_sync_sse_test.dart | 2 +- .../test/api/pseudo_manual/type_alias_twin_sync_test.dart | 2 +- frb_example/pure_dart/test/api/type_alias_test.dart | 2 +- .../pure_dart_pde/test/api/external_type_in_crate_test.dart | 4 ++-- frb_example/pure_dart_pde/test/api/mirror_test.dart | 4 ++-- .../external_type_in_crate_twin_rust_async_test.dart | 4 ++-- .../pseudo_manual/external_type_in_crate_twin_sync_test.dart | 4 ++-- .../test/api/pseudo_manual/mirror_twin_rust_async_test.dart | 4 ++-- .../test/api/pseudo_manual/mirror_twin_sync_test.dart | 4 ++-- .../api/pseudo_manual/raw_string_twin_rust_async_test.dart | 2 +- .../test/api/pseudo_manual/raw_string_twin_sync_test.dart | 2 +- .../api/pseudo_manual/type_alias_twin_rust_async_test.dart | 2 +- .../test/api/pseudo_manual/type_alias_twin_sync_test.dart | 2 +- frb_example/pure_dart_pde/test/api/raw_string_test.dart | 2 +- frb_example/pure_dart_pde/test/api/type_alias_test.dart | 2 +- 33 files changed, 49 insertions(+), 49 deletions(-) diff --git a/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_sse_test.dart index fcbaba261b..8bae879a02 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_sse_test.dart @@ -25,11 +25,11 @@ Future main({bool skipRustLibInit = false}) async { test('dart call useImportedEnum()', () async { expect( - await useImportedEnumTwinRustAsyncSse(myEnum: MyEnum.False), + await useImportedEnumTwinRustAsyncSse(myEnum: MyEnum.false_), false, ); expect( - await useImportedEnumTwinRustAsyncSse(myEnum: MyEnum.True), + await useImportedEnumTwinRustAsyncSse(myEnum: MyEnum.true_), true, ); }); diff --git a/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_test.dart index 5f2bbe9448..12b8682c3d 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_test.dart @@ -23,11 +23,11 @@ Future main({bool skipRustLibInit = false}) async { test('dart call useImportedEnum()', () async { expect( - await useImportedEnumTwinRustAsync(myEnum: MyEnum.False), + await useImportedEnumTwinRustAsync(myEnum: MyEnum.false_), false, ); expect( - await useImportedEnumTwinRustAsync(myEnum: MyEnum.True), + await useImportedEnumTwinRustAsync(myEnum: MyEnum.true_), true, ); }); diff --git a/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sse_test.dart index 309dda0eb8..5565e247d4 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sse_test.dart @@ -23,11 +23,11 @@ Future main({bool skipRustLibInit = false}) async { test('dart call useImportedEnum()', () async { expect( - await useImportedEnumTwinSse(myEnum: MyEnum.False), + await useImportedEnumTwinSse(myEnum: MyEnum.false_), false, ); expect( - await useImportedEnumTwinSse(myEnum: MyEnum.True), + await useImportedEnumTwinSse(myEnum: MyEnum.true_), true, ); }); diff --git a/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sync_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sync_sse_test.dart index 0f05100c96..a5898006d7 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sync_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sync_sse_test.dart @@ -23,11 +23,11 @@ Future main({bool skipRustLibInit = false}) async { test('dart call useImportedEnum()', () async { expect( - await useImportedEnumTwinSyncSse(myEnum: MyEnum.False), + await useImportedEnumTwinSyncSse(myEnum: MyEnum.false_), false, ); expect( - await useImportedEnumTwinSyncSse(myEnum: MyEnum.True), + await useImportedEnumTwinSyncSse(myEnum: MyEnum.true_), true, ); }); diff --git a/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sync_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sync_test.dart index 596fb6dc98..8ce8f154ce 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sync_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/external_type_in_crate_twin_sync_test.dart @@ -23,11 +23,11 @@ Future main({bool skipRustLibInit = false}) async { test('dart call useImportedEnum()', () async { expect( - await useImportedEnumTwinSync(myEnum: MyEnum.False), + await useImportedEnumTwinSync(myEnum: MyEnum.false_), false, ); expect( - await useImportedEnumTwinSync(myEnum: MyEnum.True), + await useImportedEnumTwinSync(myEnum: MyEnum.true_), true, ); }); diff --git a/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_rust_async_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_rust_async_sse_test.dart index 2453199e73..125fbe6bae 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_rust_async_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_rust_async_sse_test.dart @@ -51,8 +51,8 @@ Future main({bool skipRustLibInit = false}) async { final ret = await mirrorStructStreamTwinRustAsyncSse().first; _testAppSettings(ret.a); expect(ret.b.content, true); - expect(ret.c[0], MyEnum.True); - expect(ret.c[1], MyEnum.False); + expect(ret.c[0], MyEnum.true_); + expect(ret.c[1], MyEnum.false_); _testAppSettings(ret.d[0]); _testAppSettings(ret.d[1]); }); diff --git a/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_rust_async_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_rust_async_test.dart index 7ed11729d4..a165584bf3 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_rust_async_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_rust_async_test.dart @@ -51,8 +51,8 @@ Future main({bool skipRustLibInit = false}) async { final ret = await mirrorStructStreamTwinRustAsync().first; _testAppSettings(ret.a); expect(ret.b.content, true); - expect(ret.c[0], MyEnum.True); - expect(ret.c[1], MyEnum.False); + expect(ret.c[0], MyEnum.true_); + expect(ret.c[1], MyEnum.false_); _testAppSettings(ret.d[0]); _testAppSettings(ret.d[1]); }); diff --git a/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sse_test.dart index a610a31bfe..93ad9cfc23 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sse_test.dart @@ -51,8 +51,8 @@ Future main({bool skipRustLibInit = false}) async { final ret = await mirrorStructStreamTwinSse().first; _testAppSettings(ret.a); expect(ret.b.content, true); - expect(ret.c[0], MyEnum.True); - expect(ret.c[1], MyEnum.False); + expect(ret.c[0], MyEnum.true_); + expect(ret.c[1], MyEnum.false_); _testAppSettings(ret.d[0]); _testAppSettings(ret.d[1]); }); diff --git a/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sync_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sync_sse_test.dart index 8be074ebd8..4ecc8b281c 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sync_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sync_sse_test.dart @@ -51,8 +51,8 @@ Future main({bool skipRustLibInit = false}) async { final ret = await mirrorStructStreamTwinSyncSse().first; _testAppSettings(ret.a); expect(ret.b.content, true); - expect(ret.c[0], MyEnum.True); - expect(ret.c[1], MyEnum.False); + expect(ret.c[0], MyEnum.true_); + expect(ret.c[1], MyEnum.false_); _testAppSettings(ret.d[0]); _testAppSettings(ret.d[1]); }); diff --git a/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sync_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sync_test.dart index 40a85f531e..a619b2fdc0 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sync_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/mirror_twin_sync_test.dart @@ -51,8 +51,8 @@ Future main({bool skipRustLibInit = false}) async { final ret = await mirrorStructStreamTwinSync().first; _testAppSettings(ret.a); expect(ret.b.content, true); - expect(ret.c[0], MyEnum.True); - expect(ret.c[1], MyEnum.False); + expect(ret.c[0], MyEnum.true_); + expect(ret.c[1], MyEnum.false_); _testAppSettings(ret.d[0]); _testAppSettings(ret.d[1]); }); diff --git a/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_rust_async_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_rust_async_sse_test.dart index 0bb520a7a3..e8ca4408c0 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_rust_async_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_rust_async_sse_test.dart @@ -25,7 +25,7 @@ Future main({bool skipRustLibInit = false}) async { expect(output, isA()); expect(output.regular, "regular"); expect(output.type, "type"); - expect(output.async, true); + expect(output.async_, true); expect(output.another, "another"); }); } diff --git a/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_rust_async_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_rust_async_test.dart index 0610c9e0f2..9162e806ea 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_rust_async_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_rust_async_test.dart @@ -25,7 +25,7 @@ Future main({bool skipRustLibInit = false}) async { expect(output, isA()); expect(output.regular, "regular"); expect(output.type, "type"); - expect(output.async, true); + expect(output.async_, true); expect(output.another, "another"); }); } diff --git a/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sse_test.dart index 69719fab08..ff2b76e033 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sse_test.dart @@ -25,7 +25,7 @@ Future main({bool skipRustLibInit = false}) async { expect(output, isA()); expect(output.regular, "regular"); expect(output.type, "type"); - expect(output.async, true); + expect(output.async_, true); expect(output.another, "another"); }); } diff --git a/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sync_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sync_sse_test.dart index e92b06c68b..dcd597340b 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sync_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sync_sse_test.dart @@ -25,7 +25,7 @@ Future main({bool skipRustLibInit = false}) async { expect(output, isA()); expect(output.regular, "regular"); expect(output.type, "type"); - expect(output.async, true); + expect(output.async_, true); expect(output.another, "another"); }); } diff --git a/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sync_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sync_test.dart index 7aa8fc56c4..b1cf4a6d59 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sync_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/raw_string_twin_sync_test.dart @@ -25,7 +25,7 @@ Future main({bool skipRustLibInit = false}) async { expect(output, isA()); expect(output.regular, "regular"); expect(output.type, "type"); - expect(output.async, true); + expect(output.async_, true); expect(output.another, "another"); }); } diff --git a/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_rust_async_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_rust_async_sse_test.dart index 81c43f5e37..edb0f15206 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_rust_async_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_rust_async_sse_test.dart @@ -26,7 +26,7 @@ Future main({bool skipRustLibInit = false}) async { await handleTypeAliasModelTwinRustAsyncSse(input: BigInt.from(42)); expect(testModel.id.toInt(), 42); expect(testModel.name, "TestModel"); - expect(testModel.aliasEnum, MyEnum.False); + expect(testModel.aliasEnum, MyEnum.false_); expect(testModel.aliasStruct.content, true); }); } diff --git a/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_rust_async_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_rust_async_test.dart index 85ef60799f..e47c429775 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_rust_async_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_rust_async_test.dart @@ -25,7 +25,7 @@ Future main({bool skipRustLibInit = false}) async { await handleTypeAliasModelTwinRustAsync(input: BigInt.from(42)); expect(testModel.id.toInt(), 42); expect(testModel.name, "TestModel"); - expect(testModel.aliasEnum, MyEnum.False); + expect(testModel.aliasEnum, MyEnum.false_); expect(testModel.aliasStruct.content, true); }); } diff --git a/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sse_test.dart index ea5ed946b3..926f999db8 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sse_test.dart @@ -24,7 +24,7 @@ Future main({bool skipRustLibInit = false}) async { final testModel = await handleTypeAliasModelTwinSse(input: BigInt.from(42)); expect(testModel.id.toInt(), 42); expect(testModel.name, "TestModel"); - expect(testModel.aliasEnum, MyEnum.False); + expect(testModel.aliasEnum, MyEnum.false_); expect(testModel.aliasStruct.content, true); }); } diff --git a/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sync_sse_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sync_sse_test.dart index 166ebf2a8e..2ecbf5cb22 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sync_sse_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sync_sse_test.dart @@ -25,7 +25,7 @@ Future main({bool skipRustLibInit = false}) async { await handleTypeAliasModelTwinSyncSse(input: BigInt.from(42)); expect(testModel.id.toInt(), 42); expect(testModel.name, "TestModel"); - expect(testModel.aliasEnum, MyEnum.False); + expect(testModel.aliasEnum, MyEnum.false_); expect(testModel.aliasStruct.content, true); }); } diff --git a/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sync_test.dart b/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sync_test.dart index 059cc120d9..58f2ffe450 100644 --- a/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sync_test.dart +++ b/frb_example/pure_dart/test/api/pseudo_manual/type_alias_twin_sync_test.dart @@ -25,7 +25,7 @@ Future main({bool skipRustLibInit = false}) async { await handleTypeAliasModelTwinSync(input: BigInt.from(42)); expect(testModel.id.toInt(), 42); expect(testModel.name, "TestModel"); - expect(testModel.aliasEnum, MyEnum.False); + expect(testModel.aliasEnum, MyEnum.false_); expect(testModel.aliasStruct.content, true); }); } diff --git a/frb_example/pure_dart/test/api/type_alias_test.dart b/frb_example/pure_dart/test/api/type_alias_test.dart index 322d8c2bce..89ba47a74c 100644 --- a/frb_example/pure_dart/test/api/type_alias_test.dart +++ b/frb_example/pure_dart/test/api/type_alias_test.dart @@ -18,7 +18,7 @@ Future main({bool skipRustLibInit = false}) async { test('dart call handle_type_model', () async { final testModel = - await handleTypeAliasModelTwinNormal(input: BigInt.from(42)); + await handleTypeAliasModelTwinNormal(input: BigInt.from(42)); expect(testModel.id.toInt(), 42); expect(testModel.name, "TestModel"); expect(testModel.aliasEnum, MyEnum.false_); diff --git a/frb_example/pure_dart_pde/test/api/external_type_in_crate_test.dart b/frb_example/pure_dart_pde/test/api/external_type_in_crate_test.dart index 32c604545c..e610296d53 100644 --- a/frb_example/pure_dart_pde/test/api/external_type_in_crate_test.dart +++ b/frb_example/pure_dart_pde/test/api/external_type_in_crate_test.dart @@ -21,11 +21,11 @@ Future main({bool skipRustLibInit = false}) async { test('dart call useImportedEnum()', () async { expect( - await useImportedEnumTwinNormal(myEnum: MyEnum.False), + await useImportedEnumTwinNormal(myEnum: MyEnum.false_), false, ); expect( - await useImportedEnumTwinNormal(myEnum: MyEnum.True), + await useImportedEnumTwinNormal(myEnum: MyEnum.true_), true, ); }); diff --git a/frb_example/pure_dart_pde/test/api/mirror_test.dart b/frb_example/pure_dart_pde/test/api/mirror_test.dart index 1d02992418..2684921cda 100644 --- a/frb_example/pure_dart_pde/test/api/mirror_test.dart +++ b/frb_example/pure_dart_pde/test/api/mirror_test.dart @@ -49,8 +49,8 @@ Future main({bool skipRustLibInit = false}) async { final ret = await mirrorStructStreamTwinNormal().first; _testAppSettings(ret.a); expect(ret.b.content, true); - expect(ret.c[0], MyEnum.True); - expect(ret.c[1], MyEnum.False); + expect(ret.c[0], MyEnum.true_); + expect(ret.c[1], MyEnum.false_); _testAppSettings(ret.d[0]); _testAppSettings(ret.d[1]); }); diff --git a/frb_example/pure_dart_pde/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_test.dart b/frb_example/pure_dart_pde/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_test.dart index 96474b7e86..e29c84965a 100644 --- a/frb_example/pure_dart_pde/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_test.dart +++ b/frb_example/pure_dart_pde/test/api/pseudo_manual/external_type_in_crate_twin_rust_async_test.dart @@ -25,11 +25,11 @@ Future main({bool skipRustLibInit = false}) async { test('dart call useImportedEnum()', () async { expect( - await useImportedEnumTwinRustAsync(myEnum: MyEnum.False), + await useImportedEnumTwinRustAsync(myEnum: MyEnum.false_), false, ); expect( - await useImportedEnumTwinRustAsync(myEnum: MyEnum.True), + await useImportedEnumTwinRustAsync(myEnum: MyEnum.true_), true, ); }); diff --git a/frb_example/pure_dart_pde/test/api/pseudo_manual/external_type_in_crate_twin_sync_test.dart b/frb_example/pure_dart_pde/test/api/pseudo_manual/external_type_in_crate_twin_sync_test.dart index fbba2eecdc..cbd49279ac 100644 --- a/frb_example/pure_dart_pde/test/api/pseudo_manual/external_type_in_crate_twin_sync_test.dart +++ b/frb_example/pure_dart_pde/test/api/pseudo_manual/external_type_in_crate_twin_sync_test.dart @@ -25,11 +25,11 @@ Future main({bool skipRustLibInit = false}) async { test('dart call useImportedEnum()', () async { expect( - await useImportedEnumTwinSync(myEnum: MyEnum.False), + await useImportedEnumTwinSync(myEnum: MyEnum.false_), false, ); expect( - await useImportedEnumTwinSync(myEnum: MyEnum.True), + await useImportedEnumTwinSync(myEnum: MyEnum.true_), true, ); }); diff --git a/frb_example/pure_dart_pde/test/api/pseudo_manual/mirror_twin_rust_async_test.dart b/frb_example/pure_dart_pde/test/api/pseudo_manual/mirror_twin_rust_async_test.dart index 54c81a522d..5c43c1d127 100644 --- a/frb_example/pure_dart_pde/test/api/pseudo_manual/mirror_twin_rust_async_test.dart +++ b/frb_example/pure_dart_pde/test/api/pseudo_manual/mirror_twin_rust_async_test.dart @@ -53,8 +53,8 @@ Future main({bool skipRustLibInit = false}) async { final ret = await mirrorStructStreamTwinRustAsync().first; _testAppSettings(ret.a); expect(ret.b.content, true); - expect(ret.c[0], MyEnum.True); - expect(ret.c[1], MyEnum.False); + expect(ret.c[0], MyEnum.true_); + expect(ret.c[1], MyEnum.false_); _testAppSettings(ret.d[0]); _testAppSettings(ret.d[1]); }); diff --git a/frb_example/pure_dart_pde/test/api/pseudo_manual/mirror_twin_sync_test.dart b/frb_example/pure_dart_pde/test/api/pseudo_manual/mirror_twin_sync_test.dart index 109763ae24..ba0c6bc2f0 100644 --- a/frb_example/pure_dart_pde/test/api/pseudo_manual/mirror_twin_sync_test.dart +++ b/frb_example/pure_dart_pde/test/api/pseudo_manual/mirror_twin_sync_test.dart @@ -53,8 +53,8 @@ Future main({bool skipRustLibInit = false}) async { final ret = await mirrorStructStreamTwinSync().first; _testAppSettings(ret.a); expect(ret.b.content, true); - expect(ret.c[0], MyEnum.True); - expect(ret.c[1], MyEnum.False); + expect(ret.c[0], MyEnum.true_); + expect(ret.c[1], MyEnum.false_); _testAppSettings(ret.d[0]); _testAppSettings(ret.d[1]); }); diff --git a/frb_example/pure_dart_pde/test/api/pseudo_manual/raw_string_twin_rust_async_test.dart b/frb_example/pure_dart_pde/test/api/pseudo_manual/raw_string_twin_rust_async_test.dart index 6cbd9b67eb..7d255d83d0 100644 --- a/frb_example/pure_dart_pde/test/api/pseudo_manual/raw_string_twin_rust_async_test.dart +++ b/frb_example/pure_dart_pde/test/api/pseudo_manual/raw_string_twin_rust_async_test.dart @@ -27,7 +27,7 @@ Future main({bool skipRustLibInit = false}) async { expect(output, isA()); expect(output.regular, "regular"); expect(output.type, "type"); - expect(output.async, true); + expect(output.async_, true); expect(output.another, "another"); }); } diff --git a/frb_example/pure_dart_pde/test/api/pseudo_manual/raw_string_twin_sync_test.dart b/frb_example/pure_dart_pde/test/api/pseudo_manual/raw_string_twin_sync_test.dart index f767826118..a44a3e900b 100644 --- a/frb_example/pure_dart_pde/test/api/pseudo_manual/raw_string_twin_sync_test.dart +++ b/frb_example/pure_dart_pde/test/api/pseudo_manual/raw_string_twin_sync_test.dart @@ -27,7 +27,7 @@ Future main({bool skipRustLibInit = false}) async { expect(output, isA()); expect(output.regular, "regular"); expect(output.type, "type"); - expect(output.async, true); + expect(output.async_, true); expect(output.another, "another"); }); } diff --git a/frb_example/pure_dart_pde/test/api/pseudo_manual/type_alias_twin_rust_async_test.dart b/frb_example/pure_dart_pde/test/api/pseudo_manual/type_alias_twin_rust_async_test.dart index 049639f2f2..7a765a382f 100644 --- a/frb_example/pure_dart_pde/test/api/pseudo_manual/type_alias_twin_rust_async_test.dart +++ b/frb_example/pure_dart_pde/test/api/pseudo_manual/type_alias_twin_rust_async_test.dart @@ -27,7 +27,7 @@ Future main({bool skipRustLibInit = false}) async { await handleTypeAliasModelTwinRustAsync(input: BigInt.from(42)); expect(testModel.id.toInt(), 42); expect(testModel.name, "TestModel"); - expect(testModel.aliasEnum, MyEnum.False); + expect(testModel.aliasEnum, MyEnum.false_); expect(testModel.aliasStruct.content, true); }); } diff --git a/frb_example/pure_dart_pde/test/api/pseudo_manual/type_alias_twin_sync_test.dart b/frb_example/pure_dart_pde/test/api/pseudo_manual/type_alias_twin_sync_test.dart index ff5409624b..330a292bf3 100644 --- a/frb_example/pure_dart_pde/test/api/pseudo_manual/type_alias_twin_sync_test.dart +++ b/frb_example/pure_dart_pde/test/api/pseudo_manual/type_alias_twin_sync_test.dart @@ -27,7 +27,7 @@ Future main({bool skipRustLibInit = false}) async { await handleTypeAliasModelTwinSync(input: BigInt.from(42)); expect(testModel.id.toInt(), 42); expect(testModel.name, "TestModel"); - expect(testModel.aliasEnum, MyEnum.False); + expect(testModel.aliasEnum, MyEnum.false_); expect(testModel.aliasStruct.content, true); }); } diff --git a/frb_example/pure_dart_pde/test/api/raw_string_test.dart b/frb_example/pure_dart_pde/test/api/raw_string_test.dart index f92263a458..44ac3b483b 100644 --- a/frb_example/pure_dart_pde/test/api/raw_string_test.dart +++ b/frb_example/pure_dart_pde/test/api/raw_string_test.dart @@ -23,7 +23,7 @@ Future main({bool skipRustLibInit = false}) async { expect(output, isA()); expect(output.regular, "regular"); expect(output.type, "type"); - expect(output.async, true); + expect(output.async_, true); expect(output.another, "another"); }); } diff --git a/frb_example/pure_dart_pde/test/api/type_alias_test.dart b/frb_example/pure_dart_pde/test/api/type_alias_test.dart index df84cf000e..9ee284170b 100644 --- a/frb_example/pure_dart_pde/test/api/type_alias_test.dart +++ b/frb_example/pure_dart_pde/test/api/type_alias_test.dart @@ -23,7 +23,7 @@ Future main({bool skipRustLibInit = false}) async { await handleTypeAliasModelTwinNormal(input: BigInt.from(42)); expect(testModel.id.toInt(), 42); expect(testModel.name, "TestModel"); - expect(testModel.aliasEnum, MyEnum.False); + expect(testModel.aliasEnum, MyEnum.false_); expect(testModel.aliasStruct.content, true); }); } From 68b804ca677abf645304a440a048ef2cc38ef33c Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 15:16:35 +0800 Subject: [PATCH 35/36] fix: err --- .../integrate_third_party/integration_test/simple_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_example/integrate_third_party/integration_test/simple_test.dart b/frb_example/integrate_third_party/integration_test/simple_test.dart index 4ac54f5305..6c104d33a1 100644 --- a/frb_example/integrate_third_party/integration_test/simple_test.dart +++ b/frb_example/integrate_third_party/integration_test/simple_test.dart @@ -22,7 +22,7 @@ Future _demoUsage() async { const options = AudioContextOptions( latencyHint: AudioContextLatencyCategory.balanced(), sinkId: '', - renderSizeHint: AudioContextRenderSizeCategory.Default, + renderSizeHint: AudioContextRenderSizeCategory.default_, ); final context = AudioContext(options: options); From c6ee3ea2e1ac1ad7fa448ba22269095e9da0645e Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 12 Jun 2024 15:16:40 +0800 Subject: [PATCH 36/36] chore: goldens --- .../parser/mod/generics/expect_mir.json | 70 +++++++++++++++---- .../parser/mod/methods/expect_mir.json | 30 ++++++-- .../mod/non_qualified_names/expect_mir.json | 10 ++- .../mod/qualified_names/expect_mir.json | 10 ++- .../mod/unused_struct_enum/expect_mir.json | 5 +- .../use_type_in_another_file/expect_mir.json | 25 +++++-- 6 files changed, 120 insertions(+), 30 deletions(-) diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_mir.json index af5eecb3a2..998a2b442b 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_mir.json @@ -19,7 +19,10 @@ "default": null, "is_final": true, "is_rust_public": false, - "name": "field0", + "name": { + "dart_style": null, + "rust_style": "field0" + }, "settings": { "is_in_mirrored_enum": false }, @@ -57,8 +60,14 @@ "wrapper_name": null } }, - "name": "One", - "wrapper_name": "MyGenericEnum_One" + "name": { + "dart_style": null, + "rust_style": "One" + }, + "wrapper_name": { + "dart_style": null, + "rust_style": "MyGenericEnum_One" + } }, { "comments": [], @@ -72,7 +81,10 @@ "default": null, "is_final": true, "is_rust_public": false, - "name": "field0", + "name": { + "dart_style": null, + "rust_style": "field0" + }, "settings": { "is_in_mirrored_enum": false }, @@ -110,8 +122,14 @@ "wrapper_name": null } }, - "name": "Two", - "wrapper_name": "MyGenericEnum_Two" + "name": { + "dart_style": null, + "rust_style": "Two" + }, + "wrapper_name": { + "dart_style": null, + "rust_style": "MyGenericEnum_Two" + } } ], "wrapper_name": null @@ -139,7 +157,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "arg", + "name": { + "dart_style": null, + "rust_style": "arg" + }, "settings": { "is_in_mirrored_enum": false }, @@ -205,7 +226,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "arg", + "name": { + "dart_style": null, + "rust_style": "arg" + }, "settings": { "is_in_mirrored_enum": false }, @@ -271,7 +295,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "arg", + "name": { + "dart_style": null, + "rust_style": "arg" + }, "settings": { "is_in_mirrored_enum": false }, @@ -337,7 +364,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "arg", + "name": { + "dart_style": null, + "rust_style": "arg" + }, "settings": { "is_in_mirrored_enum": false }, @@ -403,7 +433,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "arg", + "name": { + "dart_style": null, + "rust_style": "arg" + }, "settings": { "is_in_mirrored_enum": false }, @@ -462,7 +495,10 @@ "default": null, "is_final": true, "is_rust_public": false, - "name": "generic_field", + "name": { + "dart_style": null, + "rust_style": "generic_field" + }, "settings": { "is_in_mirrored_enum": false }, @@ -496,7 +532,10 @@ "default": null, "is_final": true, "is_rust_public": false, - "name": "generic_boxed_field", + "name": { + "dart_style": null, + "rust_style": "generic_boxed_field" + }, "settings": { "is_in_mirrored_enum": false }, @@ -530,7 +569,10 @@ "default": null, "is_final": true, "is_rust_public": false, - "name": "normal_field", + "name": { + "dart_style": null, + "rust_style": "normal_field" + }, "settings": { "is_in_mirrored_enum": false }, diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_mir.json index 72436a7ee4..4e04b6e3e3 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_mir.json @@ -10,14 +10,26 @@ { "comments": [], "kind": "Value", - "name": "A", - "wrapper_name": "MyEnum_A" + "name": { + "dart_style": null, + "rust_style": "A" + }, + "wrapper_name": { + "dart_style": null, + "rust_style": "MyEnum_A" + } }, { "comments": [], "kind": "Value", - "name": "B", - "wrapper_name": "MyEnum_B" + "name": { + "dart_style": null, + "rust_style": "B" + }, + "wrapper_name": { + "dart_style": null, + "rust_style": "MyEnum_B" + } } ], "wrapper_name": null @@ -45,7 +57,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "that", + "name": { + "dart_style": null, + "rust_style": "that" + }, "settings": { "is_in_mirrored_enum": false }, @@ -168,7 +183,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "that", + "name": { + "dart_style": null, + "rust_style": "that" + }, "settings": { "is_in_mirrored_enum": false }, diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_mir.json index ac77175d66..91fe3d0b6d 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_mir.json @@ -23,7 +23,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "duration", + "name": { + "dart_style": null, + "rust_style": "duration" + }, "settings": { "is_in_mirrored_enum": false }, @@ -43,7 +46,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "uuid", + "name": { + "dart_style": null, + "rust_style": "uuid" + }, "settings": { "is_in_mirrored_enum": false }, diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_mir.json index d644dac662..1693d13170 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_mir.json @@ -23,7 +23,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "chrono_duration", + "name": { + "dart_style": null, + "rust_style": "chrono_duration" + }, "settings": { "is_in_mirrored_enum": false }, @@ -43,7 +46,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "uuid_uuid", + "name": { + "dart_style": null, + "rust_style": "uuid_uuid" + }, "settings": { "is_in_mirrored_enum": false }, diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/unused_struct_enum/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/unused_struct_enum/expect_mir.json index 5ebaa525f7..0ac94f67cb 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/unused_struct_enum/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/unused_struct_enum/expect_mir.json @@ -15,7 +15,10 @@ "default": null, "is_final": true, "is_rust_public": false, - "name": "a", + "name": { + "dart_style": null, + "rust_style": "a" + }, "settings": { "is_in_mirrored_enum": false }, diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_mir.json index 93266ee381..1bbf7f9c44 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_mir.json @@ -10,8 +10,14 @@ { "comments": [], "kind": "Value", - "name": "Apple", - "wrapper_name": "EnumInAnotherFile_Apple" + "name": { + "dart_style": null, + "rust_style": "Apple" + }, + "wrapper_name": { + "dart_style": null, + "rust_style": "EnumInAnotherFile_Apple" + } } ], "wrapper_name": null @@ -39,7 +45,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "s", + "name": { + "dart_style": null, + "rust_style": "s" + }, "settings": { "is_in_mirrored_enum": false }, @@ -67,7 +76,10 @@ "default": null, "is_final": true, "is_rust_public": null, - "name": "e", + "name": { + "dart_style": null, + "rust_style": "e" + }, "settings": { "is_in_mirrored_enum": false }, @@ -115,7 +127,10 @@ "default": null, "is_final": true, "is_rust_public": false, - "name": "a", + "name": { + "dart_style": null, + "rust_style": "a" + }, "settings": { "is_in_mirrored_enum": false },