diff --git a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/mod.rs b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/mod.rs index 271f6086d4..2e92641c01 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/mod.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/mod.rs @@ -38,6 +38,7 @@ pub(crate) struct ApiDartOutputSpecItem { pub funcs: Vec, pub classes: Vec, pub imports: DartBasicHeaderCode, + pub unused_types: Vec, pub needs_freezed: bool, } @@ -118,12 +119,18 @@ fn generate_item( }) .unwrap_or_default(); + let unused_types = (context.ir_pack.unused_types.iter()) + .filter(|t| &t.namespace == namespace) + .map(|t| t.name.to_owned()) + .collect_vec(); + let needs_freezed = classes.iter().any(|class| class.needs_freezed); Ok(ApiDartOutputSpecItem { funcs, classes, imports, + unused_types, needs_freezed, }) } diff --git a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs index d3078dd2a0..6df080c077 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs @@ -85,10 +85,21 @@ fn generate_end_api_text( let header = header.all_code(); + let unused_types = item + .unused_types + .iter() + .sorted() + .map(|t| { + format!("// The type `{t}` is not used by any `pub` functions, thus it is ignored.\n") + }) + .join(""); + format!( " {header} + {unused_types} + {funcs} {classes} diff --git a/frb_codegen/src/library/codegen/ir/pack.rs b/frb_codegen/src/library/codegen/ir/pack.rs index 5286e42315..5b7cb548ee 100644 --- a/frb_codegen/src/library/codegen/ir/pack.rs +++ b/frb_codegen/src/library/codegen/ir/pack.rs @@ -1,5 +1,6 @@ use crate::codegen::generator::codec::structs::CodecMode; use crate::codegen::ir::func::IrFunc; +use crate::codegen::ir::namespace::NamespacedName; use crate::codegen::ir::ty::enumeration::{IrEnum, IrEnumIdent}; use crate::codegen::ir::ty::structure::{IrStruct, IrStructIdent}; use crate::codegen::ir::ty::IrType; @@ -17,6 +18,7 @@ pub struct IrPack { pub struct_pool: IrStructPool, pub enum_pool: IrEnumPool, pub has_executor: bool, + pub unused_types: Vec, } impl IrPack { diff --git a/frb_codegen/src/library/codegen/parser/mod.rs b/frb_codegen/src/library/codegen/parser/mod.rs index 5f47493518..948432e86e 100644 --- a/frb_codegen/src/library/codegen/parser/mod.rs +++ b/frb_codegen/src/library/codegen/parser/mod.rs @@ -7,23 +7,22 @@ pub(crate) mod reader; pub(crate) mod source_graph; pub(crate) mod type_alias_resolver; pub(crate) mod type_parser; +mod unused_checker; use crate::codegen::dumper::Dumper; use crate::codegen::ir::pack::IrPack; -use crate::codegen::ir::ty::IrType; use crate::codegen::misc::GeneratorProgressBarPack; use crate::codegen::parser::function_extractor::extract_generalized_functions_from_file; use crate::codegen::parser::function_parser::FunctionParser; use crate::codegen::parser::internal_config::ParserInternalConfig; use crate::codegen::parser::misc::parse_has_executor; use crate::codegen::parser::reader::CachedRustReader; -use crate::codegen::parser::source_graph::modules::{Enum, Struct}; use crate::codegen::parser::type_alias_resolver::resolve_type_aliases; use crate::codegen::parser::type_parser::TypeParser; +use crate::codegen::parser::unused_checker::get_unused_types; use crate::codegen::ConfigDumpContent; use itertools::Itertools; -use log::{trace, warn}; -use std::collections::{HashMap, HashSet}; +use log::trace; use std::path::{Path, PathBuf}; use syn::File; use ConfigDumpContent::SourceGraph; @@ -93,14 +92,21 @@ pub(crate) fn parse( let (struct_pool, enum_pool) = type_parser.consume(); - let ans = IrPack { + let mut ans = IrPack { funcs: ir_funcs, struct_pool, enum_pool, has_executor, + unused_types: vec![], }; - sanity_check_unused_struct_enum(&ans, &src_structs, &src_enums); + ans.unused_types = get_unused_types( + &ans, + &src_structs, + &src_enums, + &config.rust_input_path_pack, + &config.rust_crate_dir, + )?; Ok(ans) } @@ -141,37 +147,6 @@ fn read_files( .collect() } -fn sanity_check_unused_struct_enum( - pack: &IrPack, - src_structs: &HashMap, - src_enums: &HashMap, -) { - let all_types: HashSet = [ - src_structs.keys().map_into().collect_vec(), - src_enums.keys().map_into().collect_vec(), - ] - .concat() - .into_iter() - .collect(); - - let used_types: HashSet = pack - .distinct_types(None) - .into_iter() - .filter_map(|ty| match ty { - IrType::StructRef(ty) => Some(ty.ident.0.name.clone()), - IrType::EnumRef(ty) => Some(ty.ident.0.name.clone()), - _ => None, - }) - .collect(); - - if all_types != used_types { - warn!( - "Some structs/enums are exported as `pub`, but are never used in any `pub` functions, thus they are ignored: {:?}", - all_types.difference(&used_types), - ) - } -} - #[cfg(test)] mod tests { use crate::codegen::config::internal_config::RustInputPathPack; diff --git a/frb_codegen/src/library/codegen/parser/source_graph/modules.rs b/frb_codegen/src/library/codegen/parser/source_graph/modules.rs index 0e0dd4e2f4..164560597f 100644 --- a/frb_codegen/src/library/codegen/parser/source_graph/modules.rs +++ b/frb_codegen/src/library/codegen/parser/source_graph/modules.rs @@ -1,3 +1,4 @@ +use crate::codegen::ir::namespace::Namespace; use derivative::Derivative; use quote::ToTokens; use serde::{Serialize, Serializer}; @@ -59,6 +60,14 @@ pub struct StructOrEnum { } // frb-coverage:ignore-end +impl StructOrEnum { + pub(crate) fn namespace(&self) -> Namespace { + let mut p = self.path.clone(); + p.pop(); + Namespace::new(p) + } +} + #[derive(Clone, Debug, Serialize)] pub struct Struct(pub StructOrEnum); diff --git a/frb_codegen/src/library/codegen/parser/type_parser/enum_or_struct.rs b/frb_codegen/src/library/codegen/parser/type_parser/enum_or_struct.rs index a8d50b8ecf..67b1a08a95 100644 --- a/frb_codegen/src/library/codegen/parser/type_parser/enum_or_struct.rs +++ b/frb_codegen/src/library/codegen/parser/type_parser/enum_or_struct.rs @@ -23,7 +23,7 @@ where if let Some(src_object) = self.src_objects().get(*name) { let src_object = (*src_object).clone(); - let namespace = Namespace::new(pop_last(src_object.inner().path.clone())); + let namespace = src_object.inner().namespace(); let namespaced_name = NamespacedName::new(namespace, name.to_string()); let attrs = FrbAttributes::parse(src_object.attrs())?; @@ -73,11 +73,6 @@ where ) -> anyhow::Result; } -fn pop_last(mut v: Vec) -> Vec { - v.pop(); - v -} - #[derive(Clone, Debug, Default)] pub(super) struct EnumOrStructParserInfo { parsing_or_parsed_objects: HashSet, diff --git a/frb_codegen/src/library/codegen/parser/type_parser/path.rs b/frb_codegen/src/library/codegen/parser/type_parser/path.rs index 9e047803fb..48ecd7ccaa 100644 --- a/frb_codegen/src/library/codegen/parser/type_parser/path.rs +++ b/frb_codegen/src/library/codegen/parser/type_parser/path.rs @@ -1,4 +1,5 @@ use crate::codegen::ir::ty::IrType; +use crate::codegen::parser::type_parser::path_data::extract_path_data; use crate::codegen::parser::type_parser::unencodable::splay_segments; use crate::codegen::parser::type_parser::TypeParserWithContext; use anyhow::bail; @@ -28,7 +29,7 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { type_path: &TypePath, path: &Path, ) -> anyhow::Result { - let segments = self.extract_path_data(path)?; + let segments = extract_path_data(path)?; let splayed_segments = splay_segments(&segments); if let Some(last_segment) = splayed_segments.last() { diff --git a/frb_codegen/src/library/codegen/parser/type_parser/path_data.rs b/frb_codegen/src/library/codegen/parser/type_parser/path_data.rs index 668fd67339..a0333c6f2a 100644 --- a/frb_codegen/src/library/codegen/parser/type_parser/path_data.rs +++ b/frb_codegen/src/library/codegen/parser/type_parser/path_data.rs @@ -1,75 +1,65 @@ use crate::codegen::ir::ty::rust_opaque::NameComponent; -use crate::codegen::parser::type_parser::TypeParserWithContext; use crate::if_then_some; use anyhow::Result; use syn::{ AngleBracketedGenericArguments, GenericArgument, Path, PathArguments, PathSegment, Type, }; -impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { - pub(crate) fn extract_path_data(&mut self, path: &Path) -> Result> { - path.segments - .iter() - .map(|segment| self.parse_path_segment(segment)) - .collect() - } - - fn parse_path_segment(&mut self, segment: &PathSegment) -> Result { - let ident = segment.ident.to_string(); - let args = match &segment.arguments { - PathArguments::None => vec![], - PathArguments::AngleBracketed(args) => { - self.parse_angle_bracketed_generic_arguments(args) - // .with_context(|| { - // // This will stop the whole generator and tell the users, so we do not care about testing it - // // frb-coverage:ignore-start - // anyhow!("\"{ident}\" of \"{}\" is not valid", path.to_token_stream()) - // // frb-coverage:ignore-end - // })? - } - // frb-coverage:ignore-start - _ => unreachable!(), - // frb-coverage:ignore-end +pub(crate) fn extract_path_data(path: &Path) -> Result> { + path.segments.iter().map(parse_path_segment).collect() +} - // not used yet (detected by codecov) - // syn doc says "The `(A, B) -> C` in `Fn(A, B) -> C`", - // thus it seems we will not use it here. - // - // PathArguments::Parenthesized(args) => Some(Args::Signature( - // self.parse_parenthesized_generic_arguments(args)?, - // )), - }; - Ok(NameComponent { ident, args }) - } +fn parse_path_segment(segment: &PathSegment) -> Result { + let ident = segment.ident.to_string(); + let args = match &segment.arguments { + PathArguments::None => vec![], + PathArguments::AngleBracketed(args) => { + parse_angle_bracketed_generic_arguments(args) + // .with_context(|| { + // // This will stop the whole generator and tell the users, so we do not care about testing it + // // frb-coverage:ignore-start + // anyhow!("\"{ident}\" of \"{}\" is not valid", path.to_token_stream()) + // // frb-coverage:ignore-end + // })? + } + // frb-coverage:ignore-start + _ => unreachable!(), + // frb-coverage:ignore-end - fn parse_angle_bracketed_generic_arguments( - &mut self, - args: &AngleBracketedGenericArguments, - ) -> Vec { - args.args - .iter() - .filter_map(|arg| if_then_some!(let GenericArgument::Type(ty) = arg, ty.to_owned())) - // .map(|ty| self.parse_type(ty)) - .collect() - } + // not used yet (detected by codecov) + // syn doc says "The `(A, B) -> C` in `Fn(A, B) -> C`", + // thus it seems we will not use it here. + // + // PathArguments::Parenthesized(args) => Some(Args::Signature( + // self.parse_parenthesized_generic_arguments(args)?, + // )), + }; + Ok(NameComponent { ident, args }) +} - // not used yet - // fn parse_parenthesized_generic_arguments( - // &mut self, - // args: &ParenthesizedGenericArguments, - // ) -> Result> { - // let input_types = args - // .inputs - // .iter() - // .map(|ty| self.parse_type(ty)) - // .collect::>>()?; - // - // let output_type = self.parse_return_type(&args.output)?; - // - // Ok({ - // let mut ans = vec![output_type]; - // ans.extend(input_types); - // ans - // }) - // } +fn parse_angle_bracketed_generic_arguments(args: &AngleBracketedGenericArguments) -> Vec { + args.args + .iter() + .filter_map(|arg| if_then_some!(let GenericArgument::Type(ty) = arg, ty.to_owned())) + .collect() } + +// not used yet +// fn parse_parenthesized_generic_arguments( +// &mut self, +// args: &ParenthesizedGenericArguments, +// ) -> Result> { +// let input_types = args +// .inputs +// .iter() +// .map(|ty| self.parse_type(ty)) +// .collect::>>()?; +// +// let output_type = self.parse_return_type(&args.output)?; +// +// Ok({ +// let mut ans = vec![output_type]; +// ans.extend(input_types); +// ans +// }) +// } diff --git a/frb_codegen/src/library/codegen/parser/type_parser/rust_auto_opaque.rs b/frb_codegen/src/library/codegen/parser/type_parser/rust_auto_opaque.rs index c8e4748bfa..53fb63f3cb 100644 --- a/frb_codegen/src/library/codegen/parser/type_parser/rust_auto_opaque.rs +++ b/frb_codegen/src/library/codegen/parser/type_parser/rust_auto_opaque.rs @@ -6,6 +6,7 @@ use crate::codegen::ir::ty::rust_opaque::{ IrRustOpaqueInner, IrTypeRustOpaque, RustOpaqueCodecMode, }; use crate::codegen::ir::ty::{IrType, IrTypeTrait}; +use crate::codegen::parser::type_parser::path_data::extract_path_data; use crate::codegen::parser::type_parser::rust_opaque::{ GeneralizedRustOpaqueParserInfo, RustOpaqueParserTypeInfo, }; @@ -38,7 +39,7 @@ impl<'a, 'b, 'c> TypeParserWithContext<'a, 'b, 'c> { let info = self.get_or_insert_rust_auto_opaque_info(&inner_str, namespace, None); let raw_segments = match inner { - Type::Path(inner) => self.extract_path_data(&inner.path)?, + Type::Path(inner) => extract_path_data(&inner.path)?, _ => vec![], }; diff --git a/frb_codegen/src/library/codegen/parser/unused_checker.rs b/frb_codegen/src/library/codegen/parser/unused_checker.rs new file mode 100644 index 0000000000..8f7661d66a --- /dev/null +++ b/frb_codegen/src/library/codegen/parser/unused_checker.rs @@ -0,0 +1,116 @@ +use crate::codegen::config::internal_config::RustInputPathPack; +use crate::codegen::ir::namespace::{Namespace, NamespacedName}; +use crate::codegen::ir::pack::IrPack; +use crate::codegen::ir::ty::delegate::IrTypeDelegate; +use crate::codegen::ir::ty::IrType; +use crate::codegen::parser::source_graph::modules::{Enum, Struct, StructOrEnumWrapper}; +use crate::codegen::parser::type_parser::path_data::extract_path_data; +use itertools::Itertools; +use std::collections::{HashMap, HashSet}; +use std::path::Path; +use syn::Type; + +pub(super) fn get_unused_types( + pack: &IrPack, + src_structs: &HashMap, + src_enums: &HashMap, + rust_input_path_pack: &RustInputPathPack, + rust_crate_dir: &Path, +) -> anyhow::Result> { + let interest_input_paths = rust_input_path_pack + .rust_input_paths + .iter() + .map(|p| Namespace::new_from_rust_crate_path(p, rust_crate_dir)) + .collect::>>()?; + + let all_types = [ + extract_interest_src_types(src_structs, &interest_input_paths), + extract_interest_src_types(src_enums, &interest_input_paths), + ] + .concat(); + + let used_types = pack + .distinct_types(None) + .into_iter() + .map(|ty| get_potential_struct_or_enum_names(&ty)) + .flatten_ok() + .collect::>>()?; + + let unused_types = (all_types.into_iter()) + .filter(|ty| !used_types.contains(&ty.name)) + .collect_vec(); + + Ok(unused_types) +} + +fn extract_interest_src_types, I>( + src_items: &HashMap, + interest_input_paths: &[Namespace], +) -> Vec { + (src_items.iter()) + .filter_map(|(k, v)| { + let namespace = v.inner().namespace(); + if interest_input_paths.contains(&namespace) { + Some(NamespacedName::new(namespace, k.to_owned())) + } else { + None + } + }) + .collect_vec() +} + +fn get_potential_struct_or_enum_names(ty: &IrType) -> anyhow::Result> { + Ok(match ty { + IrType::StructRef(ty) => vec![ty.ident.0.name.clone()], + IrType::EnumRef(ty) => vec![ty.ident.0.name.clone()], + IrType::RustOpaque(ty) => { + get_potential_struct_or_enum_names_from_syn_type(&syn::parse_str(&ty.inner.0)?)? + } + IrType::Delegate(IrTypeDelegate::PrimitiveEnum(ty)) => vec![ty.ir.ident.0.name.clone()], + _ => vec![], + }) +} + +fn get_potential_struct_or_enum_names_from_syn_type(ty: &Type) -> anyhow::Result> { + Ok(match ty { + Type::Path(path) => { + let segments = extract_path_data(&path.path)?; + let segment = segments.last().unwrap(); + [ + vec![segment.ident.to_owned()], + (segment.args.iter()) + .map(get_potential_struct_or_enum_names_from_syn_type) + .flatten_ok() + .collect::>>()?, + ] + .concat() + } + Type::Reference(reference) => { + get_potential_struct_or_enum_names_from_syn_type(&reference.elem)? + } + // ... maybe more ... + _ => vec![], + }) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_get_potential_struct_or_enum_names_from_syn_type() { + fn body(s: &str, matcher: Vec<&str>) { + assert_eq!( + get_potential_struct_or_enum_names_from_syn_type(&syn::parse_str(s).unwrap()) + .unwrap(), + matcher.into_iter().map(|x| x.to_owned()).collect_vec(), + ); + } + + body("Something", vec!["Something"]); + body("One", vec!["One", "Two"]); + body("a::b::One", vec!["One", "Two"]); + body("&One", vec!["One"]); + body("&mut One", vec!["One"]); + } +} diff --git a/frb_codegen/test_fixtures/library/codegen/generator/api_dart/mod/simple/expect_output.dart b/frb_codegen/test_fixtures/library/codegen/generator/api_dart/mod/simple/expect_output.dart index 54cb3d8493..7129101676 100644 --- a/frb_codegen/test_fixtures/library/codegen/generator/api_dart/mod/simple/expect_output.dart +++ b/frb_codegen/test_fixtures/library/codegen/generator/api_dart/mod/simple/expect_output.dart @@ -8,6 +8,8 @@ import 'frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + + Future firstFunction({dynamic hint}) => RustLib.instance.api.firstFunction(hint: hint); diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_ir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_ir.json index ce7620c083..4acc075de1 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_ir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_ir.json @@ -425,5 +425,6 @@ "name": "crate::api/MyGenericStruct", "wrapper_name": null } - } + }, + "unused_types": [] } \ No newline at end of file diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_ir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_ir.json index 55a22065fd..6a32e97c3e 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_ir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_ir.json @@ -190,5 +190,6 @@ "name": "crate::api/MyStruct", "wrapper_name": null } - } + }, + "unused_types": [] } \ No newline at end of file diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/multi_input_file/expect_ir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/multi_input_file/expect_ir.json index 3301ce7269..c7beee912c 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/multi_input_file/expect_ir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/multi_input_file/expect_ir.json @@ -45,5 +45,6 @@ } ], "has_executor": false, - "struct_pool": {} + "struct_pool": {}, + "unused_types": [] } \ No newline at end of file diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_ir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_ir.json index def3b5f2c4..a7c6803062 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_ir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_ir.json @@ -80,5 +80,6 @@ } ], "has_executor": false, - "struct_pool": {} + "struct_pool": {}, + "unused_types": [] } \ No newline at end of file diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_ir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_ir.json index d4a3ca1e8c..0982f8e341 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_ir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_ir.json @@ -130,5 +130,6 @@ } ], "has_executor": false, - "struct_pool": {} + "struct_pool": {}, + "unused_types": [] } \ No newline at end of file diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/simple/expect_ir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/simple/expect_ir.json index c0450d671b..f05ddbf01f 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/simple/expect_ir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/simple/expect_ir.json @@ -24,5 +24,6 @@ } ], "has_executor": false, - "struct_pool": {} + "struct_pool": {}, + "unused_types": [] } \ No newline at end of file diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/unused_struct_enum/expect_ir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/unused_struct_enum/expect_ir.json index a0df519fb4..4cf309cc98 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/unused_struct_enum/expect_ir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/unused_struct_enum/expect_ir.json @@ -2,5 +2,9 @@ "enum_pool": {}, "funcs": [], "has_executor": false, - "struct_pool": {} + "struct_pool": {}, + "unused_types": [ + "crate::api/UnusedStruct", + "crate::api/UnusedEnum" + ] } \ No newline at end of file diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_ir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_ir.json index ecf667db77..662bf530ee 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_ir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_ir.json @@ -111,5 +111,6 @@ "name": "crate::another_file/StructInAnotherFile", "wrapper_name": null } - } + }, + "unused_types": [] } \ No newline at end of file diff --git a/frb_example/pure_dart/lib/src/rust/api/attribute.dart b/frb_example/pure_dart/lib/src/rust/api/attribute.dart index a4cc020bfb..0ce84554dc 100644 --- a/frb_example/pure_dart/lib/src/rust/api/attribute.dart +++ b/frb_example/pure_dart/lib/src/rust/api/attribute.dart @@ -9,6 +9,8 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'package:meta/meta.dart' as meta; part 'attribute.freezed.dart'; +// The type `IgnoredStructTwinNormal` is not used by any `pub` functions, thus it is ignored. + Future handleCustomizedStructTwinNormal( {required CustomizedTwinNormal val, dynamic hint}) => RustLib.instance.api.handleCustomizedStructTwinNormal(val: val, hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/comment.dart b/frb_example/pure_dart/lib/src/rust/api/comment.dart index 57e6dad344..2d53d22fcb 100644 --- a/frb_example/pure_dart/lib/src/rust/api/comment.dart +++ b/frb_example/pure_dart/lib/src/rust/api/comment.dart @@ -6,6 +6,9 @@ import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `ComplexEnumWithCommentsTwinNormal` is not used by any `pub` functions, thus it is ignored. +// The type `SimpleEnumWithCommentsTwinNormal` is not used by any `pub` functions, thus it is ignored. + /// This is single line comment Future functionWithCommentsTripleSlashSingleLineTwinNormal( {dynamic hint}) => diff --git a/frb_example/pure_dart/lib/src/rust/api/customization.dart b/frb_example/pure_dart/lib/src/rust/api/customization.dart index 82d51f0373..b1a00edaac 100644 --- a/frb_example/pure_dart/lib/src/rust/api/customization.dart +++ b/frb_example/pure_dart/lib/src/rust/api/customization.dart @@ -6,5 +6,8 @@ import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `INIT_ONE_DONE` is not used by any `pub` functions, thus it is ignored. +// The type `INIT_TWO_DONE` is not used by any `pub` functions, thus it is ignored. + Future checkInitDone({dynamic hint}) => RustLib.instance.api.checkInitDone(hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/misc_example.dart b/frb_example/pure_dart/lib/src/rust/api/misc_example.dart index e47f0bfc53..c09972eae4 100644 --- a/frb_example/pure_dart/lib/src/rust/api/misc_example.dart +++ b/frb_example/pure_dart/lib/src/rust/api/misc_example.dart @@ -9,6 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'misc_example.freezed.dart'; +// The type `MySizeFreezedTwinNormal` is not used by any `pub` functions, thus it is ignored. + Future handleComplexStructTwinNormal( {required MyTreeNodeTwinNormal s, dynamic hint}) => RustLib.instance.api.handleComplexStructTwinNormal(s: s, hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async.dart index f83a5bc9d6..9b564eb88d 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async.dart @@ -9,6 +9,8 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'package:meta/meta.dart' as meta; part 'attribute_twin_rust_async.freezed.dart'; +// The type `IgnoredStructTwinRustAsync` is not used by any `pub` functions, thus it is ignored. + Future handleCustomizedStructTwinRustAsync( {required CustomizedTwinRustAsync val, dynamic hint}) => RustLib.instance.api diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async_sse.dart index 6888bc3f20..d0023480bf 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async_sse.dart @@ -9,6 +9,8 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'package:meta/meta.dart' as meta; part 'attribute_twin_rust_async_sse.freezed.dart'; +// The type `IgnoredStructTwinRustAsyncSse` is not used by any `pub` functions, thus it is ignored. + Future handleCustomizedStructTwinRustAsyncSse( {required CustomizedTwinRustAsyncSse val, dynamic hint}) => RustLib.instance.api diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sse.dart index 1ed0218620..0e42398041 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sse.dart @@ -9,6 +9,8 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'package:meta/meta.dart' as meta; part 'attribute_twin_sse.freezed.dart'; +// The type `IgnoredStructTwinSse` is not used by any `pub` functions, thus it is ignored. + Future handleCustomizedStructTwinSse( {required CustomizedTwinSse val, dynamic hint}) => RustLib.instance.api.handleCustomizedStructTwinSse(val: val, hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sync.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sync.dart index def4d5dc79..34105dc4f4 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sync.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sync.dart @@ -9,6 +9,8 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'package:meta/meta.dart' as meta; part 'attribute_twin_sync.freezed.dart'; +// The type `IgnoredStructTwinSync` is not used by any `pub` functions, thus it is ignored. + void handleCustomizedStructTwinSync( {required CustomizedTwinSync val, dynamic hint}) => RustLib.instance.api.handleCustomizedStructTwinSync(val: val, hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sync_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sync_sse.dart index 24ca7043b0..26f1a1aed8 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sync_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/attribute_twin_sync_sse.dart @@ -9,6 +9,8 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'package:meta/meta.dart' as meta; part 'attribute_twin_sync_sse.freezed.dart'; +// The type `IgnoredStructTwinSyncSse` is not used by any `pub` functions, thus it is ignored. + void handleCustomizedStructTwinSyncSse( {required CustomizedTwinSyncSse val, dynamic hint}) => RustLib.instance.api diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/benchmark_api_twin_sync_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/benchmark_api_twin_sync_sse.dart index 38adf540fa..d4e2ceee92 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/benchmark_api_twin_sync_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/benchmark_api_twin_sync_sse.dart @@ -6,6 +6,9 @@ import '../../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `BINARY_TREES` is not used by any `pub` functions, thus it is ignored. +// The type `BINARY_TREES_PROTOBUF` is not used by any `pub` functions, thus it is ignored. + void benchmarkVoidTwinSyncSse({dynamic hint}) => RustLib.instance.api.benchmarkVoidTwinSyncSse(hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_rust_async.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_rust_async.dart index 1c89be127f..3a699c7aee 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_rust_async.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_rust_async.dart @@ -6,6 +6,9 @@ import '../../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `ComplexEnumWithCommentsTwinRustAsync` is not used by any `pub` functions, thus it is ignored. +// The type `SimpleEnumWithCommentsTwinRustAsync` is not used by any `pub` functions, thus it is ignored. + /// This is single line comment Future functionWithCommentsTripleSlashSingleLineTwinRustAsync( {dynamic hint}) => diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_rust_async_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_rust_async_sse.dart index b7d58f2964..7aad376cc1 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_rust_async_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_rust_async_sse.dart @@ -6,6 +6,9 @@ import '../../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `ComplexEnumWithCommentsTwinRustAsyncSse` is not used by any `pub` functions, thus it is ignored. +// The type `SimpleEnumWithCommentsTwinRustAsyncSse` is not used by any `pub` functions, thus it is ignored. + /// This is single line comment Future functionWithCommentsTripleSlashSingleLineTwinRustAsyncSse( {dynamic hint}) => diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sse.dart index f8f2689e17..b2e2b80dc9 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sse.dart @@ -6,6 +6,9 @@ import '../../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `ComplexEnumWithCommentsTwinSse` is not used by any `pub` functions, thus it is ignored. +// The type `SimpleEnumWithCommentsTwinSse` is not used by any `pub` functions, thus it is ignored. + /// This is single line comment Future functionWithCommentsTripleSlashSingleLineTwinSse({dynamic hint}) => RustLib.instance.api diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sync.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sync.dart index 08645ba03d..0652b99a6f 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sync.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sync.dart @@ -6,6 +6,9 @@ import '../../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `ComplexEnumWithCommentsTwinSync` is not used by any `pub` functions, thus it is ignored. +// The type `SimpleEnumWithCommentsTwinSync` is not used by any `pub` functions, thus it is ignored. + /// This is single line comment void functionWithCommentsTripleSlashSingleLineTwinSync({dynamic hint}) => RustLib.instance.api diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sync_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sync_sse.dart index 9c99cdb0cc..769fbdfe12 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sync_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/comment_twin_sync_sse.dart @@ -6,6 +6,9 @@ import '../../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `ComplexEnumWithCommentsTwinSyncSse` is not used by any `pub` functions, thus it is ignored. +// The type `SimpleEnumWithCommentsTwinSyncSse` is not used by any `pub` functions, thus it is ignored. + /// This is single line comment void functionWithCommentsTripleSlashSingleLineTwinSyncSse({dynamic hint}) => RustLib.instance.api diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/dart_opaque_twin_sync_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/dart_opaque_twin_sync_sse.dart index e3da04339a..869d1fc457 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/dart_opaque_twin_sync_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/dart_opaque_twin_sync_sse.dart @@ -9,6 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'dart_opaque_twin_sync_sse.freezed.dart'; +// The type `DART_OPAQUE` is not used by any `pub` functions, thus it is ignored. + String asyncAcceptDartOpaqueTwinSyncSse( {required Object opaque, dynamic hint}) => RustLib.instance.api diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/dropping_twin_sync_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/dropping_twin_sync_sse.dart index f9a2470e31..6830890664 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/dropping_twin_sync_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/dropping_twin_sync_sse.dart @@ -6,6 +6,8 @@ import '../../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `DROP_COUNT` is not used by any `pub` functions, thus it is ignored. + // Rust type: RustOpaqueNom> @sealed class DroppableTwinSyncSse extends RustOpaque { diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/event_listener_twin_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/event_listener_twin_sse.dart index 2ff9024705..42242c806f 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/event_listener_twin_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/event_listener_twin_sse.dart @@ -8,6 +8,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'event_listener_twin_sse.freezed.dart'; +// The type `EVENTS` is not used by any `pub` functions, thus it is ignored. + Stream registerEventListenerTwinSse({dynamic hint}) => RustLib.instance.api.registerEventListenerTwinSse(hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async.dart index f44db66de0..8205b14df0 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async.dart @@ -9,6 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'misc_example_twin_rust_async.freezed.dart'; +// The type `MySizeFreezedTwinRustAsync` is not used by any `pub` functions, thus it is ignored. + Future handleComplexStructTwinRustAsync( {required MyTreeNodeTwinRustAsync s, dynamic hint}) => RustLib.instance.api.handleComplexStructTwinRustAsync(s: s, hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async_sse.dart index f92f858f97..971173dce5 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async_sse.dart @@ -9,6 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'misc_example_twin_rust_async_sse.freezed.dart'; +// The type `MySizeFreezedTwinRustAsyncSse` is not used by any `pub` functions, thus it is ignored. + Future handleComplexStructTwinRustAsyncSse( {required MyTreeNodeTwinRustAsyncSse s, dynamic hint}) => RustLib.instance.api.handleComplexStructTwinRustAsyncSse(s: s, hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sse.dart index 08c0b6fa70..3107ca9141 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sse.dart @@ -9,6 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'misc_example_twin_sse.freezed.dart'; +// The type `MySizeFreezedTwinSse` is not used by any `pub` functions, thus it is ignored. + Future handleComplexStructTwinSse( {required MyTreeNodeTwinSse s, dynamic hint}) => RustLib.instance.api.handleComplexStructTwinSse(s: s, hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sync.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sync.dart index 7543e876fc..d0f2313c45 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sync.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sync.dart @@ -9,6 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'misc_example_twin_sync.freezed.dart'; +// The type `MySizeFreezedTwinSync` is not used by any `pub` functions, thus it is ignored. + MyTreeNodeTwinSync handleComplexStructTwinSync( {required MyTreeNodeTwinSync s, dynamic hint}) => RustLib.instance.api.handleComplexStructTwinSync(s: s, hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sync_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sync_sse.dart index 77af377150..c44e57601b 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sync_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/misc_example_twin_sync_sse.dart @@ -9,6 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'misc_example_twin_sync_sse.freezed.dart'; +// The type `MySizeFreezedTwinSyncSse` is not used by any `pub` functions, thus it is ignored. + MyTreeNodeTwinSyncSse handleComplexStructTwinSyncSse( {required MyTreeNodeTwinSyncSse s, dynamic hint}) => RustLib.instance.api.handleComplexStructTwinSyncSse(s: s, hint: hint); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_moi.dart index a68a4bf934..9fcfedf0bd 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_moi.dart @@ -8,6 +8,9 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'rust_auto_opaque_twin_moi.freezed.dart'; +// The type `HelloOneStructTwinMoi` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinMoi` is not used by any `pub` functions, thus it is ignored. + Future rustAutoOpaqueArgOwnTwinMoi( {required NonCloneSimpleTwinMoi arg, required int expect, diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart index ef16b0e433..36c2d56812 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'rust_auto_opaque_twin_moi.dart'; part 'rust_auto_opaque_twin_rust_async.freezed.dart'; +// The type `HelloOneStructTwinRustAsync` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinRustAsync` is not used by any `pub` functions, thus it is ignored. + Future rustAutoOpaqueArgOwnTwinRustAsync( {required NonCloneSimpleTwinRustAsync arg, required int expect, diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.dart index b1d3daf197..a6ca1d3702 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'rust_auto_opaque_twin_moi.dart'; part 'rust_auto_opaque_twin_rust_async_moi.freezed.dart'; +// The type `HelloOneStructTwinRustAsyncMoi` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinRustAsyncMoi` is not used by any `pub` functions, thus it is ignored. + Future rustAutoOpaqueArgOwnTwinRustAsyncMoi( {required NonCloneSimpleTwinRustAsyncMoi arg, required int expect, diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.dart index 92f73af7f0..b657885f37 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'rust_auto_opaque_twin_moi.dart'; part 'rust_auto_opaque_twin_rust_async_sse.freezed.dart'; +// The type `HelloOneStructTwinRustAsyncSse` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinRustAsyncSse` is not used by any `pub` functions, thus it is ignored. + Future rustAutoOpaqueArgOwnTwinRustAsyncSse( {required NonCloneSimpleTwinRustAsyncSse arg, required int expect, diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.dart index 34b62d734a..7927d40d3b 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'rust_auto_opaque_twin_moi.dart'; part 'rust_auto_opaque_twin_rust_async_sse_moi.freezed.dart'; +// The type `HelloOneStructTwinRustAsyncSseMoi` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinRustAsyncSseMoi` is not used by any `pub` functions, thus it is ignored. + Future rustAutoOpaqueArgOwnTwinRustAsyncSseMoi( {required NonCloneSimpleTwinRustAsyncSseMoi arg, required int expect, diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse.dart index d8100da8c1..0376aaf8c7 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'rust_auto_opaque_twin_moi.dart'; part 'rust_auto_opaque_twin_sse.freezed.dart'; +// The type `HelloOneStructTwinSse` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinSse` is not used by any `pub` functions, thus it is ignored. + Future rustAutoOpaqueArgOwnTwinSse( {required NonCloneSimpleTwinSse arg, required int expect, diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.dart index 82c7e8eab7..c4397fec83 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'rust_auto_opaque_twin_moi.dart'; part 'rust_auto_opaque_twin_sse_moi.freezed.dart'; +// The type `HelloOneStructTwinSseMoi` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinSseMoi` is not used by any `pub` functions, thus it is ignored. + Future rustAutoOpaqueArgOwnTwinSseMoi( {required NonCloneSimpleTwinSseMoi arg, required int expect, diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart index 5d7e7e7be2..b8298f6706 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'rust_auto_opaque_twin_moi.dart'; part 'rust_auto_opaque_twin_sync.freezed.dart'; +// The type `HelloOneStructTwinSync` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinSync` is not used by any `pub` functions, thus it is ignored. + void rustAutoOpaqueArgOwnTwinSync( {required NonCloneSimpleTwinSync arg, required int expect, diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.dart index df45275451..97ddf50235 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'rust_auto_opaque_twin_moi.dart'; part 'rust_auto_opaque_twin_sync_moi.freezed.dart'; +// The type `HelloOneStructTwinSyncMoi` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinSyncMoi` is not used by any `pub` functions, thus it is ignored. + void rustAutoOpaqueArgOwnTwinSyncMoi( {required NonCloneSimpleTwinSyncMoi arg, required int expect, diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.dart index 84542f8994..b35004ff50 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'rust_auto_opaque_twin_moi.dart'; part 'rust_auto_opaque_twin_sync_sse.freezed.dart'; +// The type `HelloOneStructTwinSyncSse` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinSyncSse` is not used by any `pub` functions, thus it is ignored. + void rustAutoOpaqueArgOwnTwinSyncSse( {required NonCloneSimpleTwinSyncSse arg, required int expect, diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.dart index 18a84de443..416e26c30d 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'rust_auto_opaque_twin_moi.dart'; part 'rust_auto_opaque_twin_sync_sse_moi.freezed.dart'; +// The type `HelloOneStructTwinSyncSseMoi` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinSyncSseMoi` is not used by any `pub` functions, thus it is ignored. + void rustAutoOpaqueArgOwnTwinSyncSseMoi( {required NonCloneSimpleTwinSyncSseMoi arg, required int expect, diff --git a/frb_example/pure_dart/lib/src/rust/api/rust_auto_opaque.dart b/frb_example/pure_dart/lib/src/rust/api/rust_auto_opaque.dart index 4c72ec6ea3..a0e46394f3 100644 --- a/frb_example/pure_dart/lib/src/rust/api/rust_auto_opaque.dart +++ b/frb_example/pure_dart/lib/src/rust/api/rust_auto_opaque.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'pseudo_manual/rust_auto_opaque_twin_moi.dart'; part 'rust_auto_opaque.freezed.dart'; +// The type `HelloOneStructTwinNormal` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinNormal` is not used by any `pub` functions, thus it is ignored. + Future rustAutoOpaqueArgOwnTwinNormal( {required NonCloneSimpleTwinNormal arg, required int expect, diff --git a/frb_example/pure_dart/rust/src/api/dropping.rs b/frb_example/pure_dart/rust/src/api/dropping.rs index e897e9e419..8ab518f77b 100644 --- a/frb_example/pure_dart/rust/src/api/dropping.rs +++ b/frb_example/pure_dart/rust/src/api/dropping.rs @@ -6,7 +6,7 @@ use lazy_static::lazy_static; use std::sync::atomic::{AtomicI32, Ordering}; lazy_static! { - static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); + pub(crate) static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); } #[frb(opaque)] diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_rust_async.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_rust_async.rs index fb50dbc6c1..d208dc32b7 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_rust_async.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_rust_async.rs @@ -10,7 +10,7 @@ use lazy_static::lazy_static; use std::sync::atomic::{AtomicI32, Ordering}; lazy_static! { - static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); + pub(crate) static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); } #[frb(opaque)] diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_rust_async_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_rust_async_sse.rs index 6a56956e94..22550dc6ef 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_rust_async_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_rust_async_sse.rs @@ -10,7 +10,7 @@ use lazy_static::lazy_static; use std::sync::atomic::{AtomicI32, Ordering}; lazy_static! { - static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); + pub(crate) static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); } #[frb(opaque)] diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sse.rs index 66d2676014..72b4c999c6 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sse.rs @@ -10,7 +10,7 @@ use lazy_static::lazy_static; use std::sync::atomic::{AtomicI32, Ordering}; lazy_static! { - static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); + pub(crate) static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); } #[frb(opaque)] diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sync.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sync.rs index b34c9cbb18..47b6d75615 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sync.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sync.rs @@ -10,7 +10,7 @@ use lazy_static::lazy_static; use std::sync::atomic::{AtomicI32, Ordering}; lazy_static! { - static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); + pub(crate) static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); } #[frb(opaque)] diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sync_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sync_sse.rs index 6754c6e918..ba6f3eb511 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sync_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/dropping_twin_sync_sse.rs @@ -10,7 +10,7 @@ use lazy_static::lazy_static; use std::sync::atomic::{AtomicI32, Ordering}; lazy_static! { - static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); + pub(crate) static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); } #[frb(opaque)] diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/attribute.dart b/frb_example/pure_dart_pde/lib/src/rust/api/attribute.dart index a4cc020bfb..0ce84554dc 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/attribute.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/attribute.dart @@ -9,6 +9,8 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'package:meta/meta.dart' as meta; part 'attribute.freezed.dart'; +// The type `IgnoredStructTwinNormal` is not used by any `pub` functions, thus it is ignored. + Future handleCustomizedStructTwinNormal( {required CustomizedTwinNormal val, dynamic hint}) => RustLib.instance.api.handleCustomizedStructTwinNormal(val: val, hint: hint); diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/comment.dart b/frb_example/pure_dart_pde/lib/src/rust/api/comment.dart index 57e6dad344..2d53d22fcb 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/comment.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/comment.dart @@ -6,6 +6,9 @@ import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `ComplexEnumWithCommentsTwinNormal` is not used by any `pub` functions, thus it is ignored. +// The type `SimpleEnumWithCommentsTwinNormal` is not used by any `pub` functions, thus it is ignored. + /// This is single line comment Future functionWithCommentsTripleSlashSingleLineTwinNormal( {dynamic hint}) => diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/customization.dart b/frb_example/pure_dart_pde/lib/src/rust/api/customization.dart index 82d51f0373..b1a00edaac 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/customization.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/customization.dart @@ -6,5 +6,8 @@ import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `INIT_ONE_DONE` is not used by any `pub` functions, thus it is ignored. +// The type `INIT_TWO_DONE` is not used by any `pub` functions, thus it is ignored. + Future checkInitDone({dynamic hint}) => RustLib.instance.api.checkInitDone(hint: hint); diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/misc_example.dart b/frb_example/pure_dart_pde/lib/src/rust/api/misc_example.dart index e47f0bfc53..c09972eae4 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/misc_example.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/misc_example.dart @@ -9,6 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'misc_example.freezed.dart'; +// The type `MySizeFreezedTwinNormal` is not used by any `pub` functions, thus it is ignored. + Future handleComplexStructTwinNormal( {required MyTreeNodeTwinNormal s, dynamic hint}) => RustLib.instance.api.handleComplexStructTwinNormal(s: s, hint: hint); diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async.dart index f83a5bc9d6..9b564eb88d 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/attribute_twin_rust_async.dart @@ -9,6 +9,8 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'package:meta/meta.dart' as meta; part 'attribute_twin_rust_async.freezed.dart'; +// The type `IgnoredStructTwinRustAsync` is not used by any `pub` functions, thus it is ignored. + Future handleCustomizedStructTwinRustAsync( {required CustomizedTwinRustAsync val, dynamic hint}) => RustLib.instance.api diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/attribute_twin_sync.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/attribute_twin_sync.dart index def4d5dc79..34105dc4f4 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/attribute_twin_sync.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/attribute_twin_sync.dart @@ -9,6 +9,8 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'package:meta/meta.dart' as meta; part 'attribute_twin_sync.freezed.dart'; +// The type `IgnoredStructTwinSync` is not used by any `pub` functions, thus it is ignored. + void handleCustomizedStructTwinSync( {required CustomizedTwinSync val, dynamic hint}) => RustLib.instance.api.handleCustomizedStructTwinSync(val: val, hint: hint); diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/benchmark_api_twin_sync.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/benchmark_api_twin_sync.dart index 829db7e80e..912db0e9e3 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/benchmark_api_twin_sync.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/benchmark_api_twin_sync.dart @@ -6,6 +6,9 @@ import '../../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `BINARY_TREES` is not used by any `pub` functions, thus it is ignored. +// The type `BINARY_TREES_PROTOBUF` is not used by any `pub` functions, thus it is ignored. + void benchmarkVoidTwinSync({dynamic hint}) => RustLib.instance.api.benchmarkVoidTwinSync(hint: hint); diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/comment_twin_rust_async.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/comment_twin_rust_async.dart index 1c89be127f..3a699c7aee 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/comment_twin_rust_async.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/comment_twin_rust_async.dart @@ -6,6 +6,9 @@ import '../../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `ComplexEnumWithCommentsTwinRustAsync` is not used by any `pub` functions, thus it is ignored. +// The type `SimpleEnumWithCommentsTwinRustAsync` is not used by any `pub` functions, thus it is ignored. + /// This is single line comment Future functionWithCommentsTripleSlashSingleLineTwinRustAsync( {dynamic hint}) => diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/comment_twin_sync.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/comment_twin_sync.dart index 08645ba03d..0652b99a6f 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/comment_twin_sync.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/comment_twin_sync.dart @@ -6,6 +6,9 @@ import '../../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `ComplexEnumWithCommentsTwinSync` is not used by any `pub` functions, thus it is ignored. +// The type `SimpleEnumWithCommentsTwinSync` is not used by any `pub` functions, thus it is ignored. + /// This is single line comment void functionWithCommentsTripleSlashSingleLineTwinSync({dynamic hint}) => RustLib.instance.api diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/dart_opaque_twin_sync.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/dart_opaque_twin_sync.dart index afdf675acb..c390706f5d 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/dart_opaque_twin_sync.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/dart_opaque_twin_sync.dart @@ -9,6 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'dart_opaque_twin_sync.freezed.dart'; +// The type `DART_OPAQUE` is not used by any `pub` functions, thus it is ignored. + String asyncAcceptDartOpaqueTwinSync({required Object opaque, dynamic hint}) => RustLib.instance.api .asyncAcceptDartOpaqueTwinSync(opaque: opaque, hint: hint); diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/dropping_twin_sync.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/dropping_twin_sync.dart index 77198d2e52..cae2bcac07 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/dropping_twin_sync.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/dropping_twin_sync.dart @@ -6,6 +6,8 @@ import '../../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +// The type `DROP_COUNT` is not used by any `pub` functions, thus it is ignored. + // Rust type: RustOpaqueMoi> @sealed class DroppableTwinSync extends RustOpaque { diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/event_listener_twin_rust_async.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/event_listener_twin_rust_async.dart index d06ae0b146..39fe260cab 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/event_listener_twin_rust_async.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/event_listener_twin_rust_async.dart @@ -8,6 +8,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'event_listener_twin_rust_async.freezed.dart'; +// The type `EVENTS` is not used by any `pub` functions, thus it is ignored. + Stream registerEventListenerTwinRustAsync({dynamic hint}) => RustLib.instance.api.registerEventListenerTwinRustAsync(hint: hint); diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async.dart index f44db66de0..8205b14df0 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/misc_example_twin_rust_async.dart @@ -9,6 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'misc_example_twin_rust_async.freezed.dart'; +// The type `MySizeFreezedTwinRustAsync` is not used by any `pub` functions, thus it is ignored. + Future handleComplexStructTwinRustAsync( {required MyTreeNodeTwinRustAsync s, dynamic hint}) => RustLib.instance.api.handleComplexStructTwinRustAsync(s: s, hint: hint); diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/misc_example_twin_sync.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/misc_example_twin_sync.dart index 7543e876fc..d0f2313c45 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/misc_example_twin_sync.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/misc_example_twin_sync.dart @@ -9,6 +9,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'misc_example_twin_sync.freezed.dart'; +// The type `MySizeFreezedTwinSync` is not used by any `pub` functions, thus it is ignored. + MyTreeNodeTwinSync handleComplexStructTwinSync( {required MyTreeNodeTwinSync s, dynamic hint}) => RustLib.instance.api.handleComplexStructTwinSync(s: s, hint: hint); diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart index 4df4b28530..f1da9b1d43 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart @@ -8,6 +8,9 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'rust_auto_opaque_twin_rust_async.freezed.dart'; +// The type `HelloOneStructTwinRustAsync` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinRustAsync` is not used by any `pub` functions, thus it is ignored. + Future rustAutoOpaqueArgOwnTwinRustAsync( {required NonCloneSimpleTwinRustAsync arg, required int expect, diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart index 15046887a1..65c0d50140 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'rust_auto_opaque_twin_rust_async.dart'; part 'rust_auto_opaque_twin_sync.freezed.dart'; +// The type `HelloOneStructTwinSync` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinSync` is not used by any `pub` functions, thus it is ignored. + void rustAutoOpaqueArgOwnTwinSync( {required NonCloneSimpleTwinSync arg, required int expect, diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/rust_auto_opaque.dart b/frb_example/pure_dart_pde/lib/src/rust/api/rust_auto_opaque.dart index cabc035d6b..3fef255cba 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/rust_auto_opaque.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/rust_auto_opaque.dart @@ -9,6 +9,9 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; import 'pseudo_manual/rust_auto_opaque_twin_rust_async.dart'; part 'rust_auto_opaque.freezed.dart'; +// The type `HelloOneStructTwinNormal` is not used by any `pub` functions, thus it is ignored. +// The type `HelloTwoEnumTwinNormal` is not used by any `pub` functions, thus it is ignored. + Future rustAutoOpaqueArgOwnTwinNormal( {required NonCloneSimpleTwinNormal arg, required int expect, diff --git a/frb_example/pure_dart_pde/rust/src/api/dropping.rs b/frb_example/pure_dart_pde/rust/src/api/dropping.rs index 61170adf00..f2989ca14e 100644 --- a/frb_example/pure_dart_pde/rust/src/api/dropping.rs +++ b/frb_example/pure_dart_pde/rust/src/api/dropping.rs @@ -8,7 +8,7 @@ use lazy_static::lazy_static; use std::sync::atomic::{AtomicI32, Ordering}; lazy_static! { - static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); + pub(crate) static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); } #[frb(opaque)] diff --git a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/dropping_twin_rust_async.rs b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/dropping_twin_rust_async.rs index bb4c24a6d3..d63312747d 100644 --- a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/dropping_twin_rust_async.rs +++ b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/dropping_twin_rust_async.rs @@ -12,7 +12,7 @@ use lazy_static::lazy_static; use std::sync::atomic::{AtomicI32, Ordering}; lazy_static! { - static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); + pub(crate) static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); } #[frb(opaque)] diff --git a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/dropping_twin_sync.rs b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/dropping_twin_sync.rs index e721a44c03..939b198c97 100644 --- a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/dropping_twin_sync.rs +++ b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/dropping_twin_sync.rs @@ -12,7 +12,7 @@ use lazy_static::lazy_static; use std::sync::atomic::{AtomicI32, Ordering}; lazy_static! { - static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); + pub(crate) static ref DROP_COUNT: AtomicI32 = AtomicI32::new(0); } #[frb(opaque)]