Skip to content

Commit

Permalink
chore: codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
fzyzcjy committed Jul 3, 2024
1 parent bff046a commit 0906a1f
Show file tree
Hide file tree
Showing 9 changed files with 1,978 additions and 1,944 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import 'misc_no_twin_example_b.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

// These functions are ignored because they are not marked as `pub`: `log`
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `fmt`
// These types are ignored because they are not used by any `pub` functions: `Issue2170Struct`
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `fmt`, `fmt`

Future<void> sameFunctionNameInDifferentFiles() => RustLib.instance.api
.crateApiMiscNoTwinExampleASameFunctionNameInDifferentFiles();
Expand Down Expand Up @@ -117,6 +118,10 @@ abstract class StructWithSimpleSetterTwinNormal implements RustOpaqueInterface {
set simpleSetter(int value);
}

abstract class Issue2170Trait {
Future<void> method();
}

class ItemContainerSolutionTwoTwinNormal {
String name;
final List<OpaqueItemTwinNormal> items;
Expand Down
6 changes: 6 additions & 0 deletions frb_example/pure_dart/lib/src/rust/frb_generated.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103094,6 +103094,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
return raw as String;
}

@protected
Issue2170Trait dco_decode_TraitDef_Issue2170Trait(dynamic raw) {
// Codec=Dco (DartCObject based), see doc to use other codecs
throw UnimplementedError();
}

@protected
MyTraitTwinMoi dco_decode_TraitDef_MyTraitTwinMoi(dynamic raw) {
// Codec=Dco (DartCObject based), see doc to use other codecs
Expand Down
3 changes: 3 additions & 0 deletions frb_example/pure_dart/lib/src/rust/frb_generated.io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4217,6 +4217,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
@protected
String dco_decode_String(dynamic raw);

@protected
Issue2170Trait dco_decode_TraitDef_Issue2170Trait(dynamic raw);

@protected
MyTraitTwinMoi dco_decode_TraitDef_MyTraitTwinMoi(dynamic raw);

Expand Down
3 changes: 3 additions & 0 deletions frb_example/pure_dart/lib/src/rust/frb_generated.web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4219,6 +4219,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
@protected
String dco_decode_String(dynamic raw);

@protected
Issue2170Trait dco_decode_TraitDef_Issue2170Trait(dynamic raw);

@protected
MyTraitTwinMoi dco_decode_TraitDef_MyTraitTwinMoi(dynamic raw);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import 'misc_no_twin_example_b.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

// These functions are ignored because they are not marked as `pub`: `log`
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `fmt`
// These types are ignored because they are not used by any `pub` functions: `Issue2170Struct`
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `fmt`, `fmt`

Future<void> sameFunctionNameInDifferentFiles() => RustLib.instance.api
.crateApiMiscNoTwinExampleASameFunctionNameInDifferentFiles();
Expand Down Expand Up @@ -117,6 +118,10 @@ abstract class StructWithSimpleSetterTwinNormal implements RustOpaqueInterface {
set simpleSetter(int value);
}

abstract class Issue2170Trait {
Future<void> method();
}

class ItemContainerSolutionTwoTwinNormal {
String name;
final List<OpaqueItemTwinNormal> items;
Expand Down
1,948 changes: 977 additions & 971 deletions frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions frb_example/pure_dart_pde/lib/src/rust/frb_generated.io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1953,6 +1953,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
@protected
String dco_decode_String(dynamic raw);

@protected
Issue2170Trait dco_decode_TraitDef_Issue2170Trait(dynamic raw);

@protected
MyTraitTwinNormal dco_decode_TraitDef_MyTraitTwinNormal(dynamic raw);

Expand Down
3 changes: 3 additions & 0 deletions frb_example/pure_dart_pde/lib/src/rust/frb_generated.web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1955,6 +1955,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
@protected
String dco_decode_String(dynamic raw);

@protected
Issue2170Trait dco_decode_TraitDef_Issue2170Trait(dynamic raw);

@protected
MyTraitTwinNormal dco_decode_TraitDef_MyTraitTwinNormal(dynamic raw);

Expand Down
1,942 changes: 971 additions & 971 deletions frb_example/pure_dart_pde/rust/src/frb_generated.rs

Large diffs are not rendered by default.

0 comments on commit 0906a1f

Please sign in to comment.