Skip to content

Commit

Permalink
🚀 Roll FRB
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Jul 19, 2024
1 parent 6805752 commit 3795d93
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 55 deletions.
16 changes: 9 additions & 7 deletions lib/src/api/rune.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0.
// Generated by `flutter_rust_bridge`@ 2.1.0.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

Expand Down Expand Up @@ -143,9 +143,10 @@ class Rune with _$Rune {
static Rune reserved({required BigInt block, required int tx}) =>
OrdDart.instance.api.crateApiRuneRuneReserved(block: block, tx: tx);

String toString() => OrdDart.instance.api.crateApiRuneRuneToString(
that: this,
);
@override
String toString() {
return OrdDart.instance.api.crateApiRuneRuneToString(that: this);
}
}

@freezed
Expand Down Expand Up @@ -215,9 +216,10 @@ class SpacedRune with _$SpacedRune {
static SpacedRune fromStr({required String s}) =>
OrdDart.instance.api.crateApiRuneSpacedRuneFromStr(s: s);

String toString() => OrdDart.instance.api.crateApiRuneSpacedRuneToString(
that: this,
);
@override
String toString() {
return OrdDart.instance.api.crateApiRuneSpacedRuneToString(that: this);
}
}

@freezed
Expand Down
42 changes: 19 additions & 23 deletions lib/src/api/rune.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ final _privateConstructorUsedError = UnsupportedError(
/// @nodoc
mixin _$Artifact {
Object get field0 => throw _privateConstructorUsedError;

@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(Cenotaph field0) cenotaph,
required TResult Function(Runestone field0) runestone,
}) =>
throw _privateConstructorUsedError;

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(Cenotaph field0)? cenotaph,
Expand All @@ -38,14 +36,12 @@ mixin _$Artifact {
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;

@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(Artifact_Cenotaph value) cenotaph,
required TResult Function(Artifact_Runestone value) runestone,
}) =>
throw _privateConstructorUsedError;

@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(Artifact_Cenotaph value)? cenotaph,
Expand All @@ -72,9 +68,9 @@ class _$ArtifactCopyWithImpl<$Res, $Val extends Artifact>
implements $ArtifactCopyWith<$Res> {
_$ArtifactCopyWithImpl(this._value, this._then);

// ignore: unused_field
// ignore: unused_field
final $Val _value;
// ignore: unused_field
// ignore: unused_field
final $Res Function($Val) _then;
}

Expand Down Expand Up @@ -399,9 +395,9 @@ class _$CenotaphCopyWithImpl<$Res, $Val extends Cenotaph>
implements $CenotaphCopyWith<$Res> {
_$CenotaphCopyWithImpl(this._value, this._then);

// ignore: unused_field
// ignore: unused_field
final $Val _value;
// ignore: unused_field
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
Expand Down Expand Up @@ -580,9 +576,9 @@ class _$EdictCopyWithImpl<$Res, $Val extends Edict>
implements $EdictCopyWith<$Res> {
_$EdictCopyWithImpl(this._value, this._then);

// ignore: unused_field
// ignore: unused_field
final $Val _value;
// ignore: unused_field
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
Expand Down Expand Up @@ -757,9 +753,9 @@ class _$EtchingCopyWithImpl<$Res, $Val extends Etching>
implements $EtchingCopyWith<$Res> {
_$EtchingCopyWithImpl(this._value, this._then);

// ignore: unused_field
// ignore: unused_field
final $Val _value;
// ignore: unused_field
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
Expand Down Expand Up @@ -1015,9 +1011,9 @@ class _$RuneCopyWithImpl<$Res, $Val extends Rune>
implements $RuneCopyWith<$Res> {
_$RuneCopyWithImpl(this._value, this._then);

// ignore: unused_field
// ignore: unused_field
final $Val _value;
// ignore: unused_field
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
Expand Down Expand Up @@ -1125,9 +1121,9 @@ class _$RuneIdCopyWithImpl<$Res, $Val extends RuneId>
implements $RuneIdCopyWith<$Res> {
_$RuneIdCopyWithImpl(this._value, this._then);

// ignore: unused_field
// ignore: unused_field
final $Val _value;
// ignore: unused_field
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
Expand Down Expand Up @@ -1259,9 +1255,9 @@ class _$RunestoneCopyWithImpl<$Res, $Val extends Runestone>
implements $RunestoneCopyWith<$Res> {
_$RunestoneCopyWithImpl(this._value, this._then);

// ignore: unused_field
// ignore: unused_field
final $Val _value;
// ignore: unused_field
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
Expand Down Expand Up @@ -1385,7 +1381,7 @@ class _$RunestoneImpl extends _Runestone {
final value = _edicts;
if (value == null) return null;
if (_edicts is EqualUnmodifiableListView) return _edicts;
// ignore: implicit_dynamic_type
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}

Expand Down Expand Up @@ -1471,9 +1467,9 @@ class _$SpacedRuneCopyWithImpl<$Res, $Val extends SpacedRune>
implements $SpacedRuneCopyWith<$Res> {
_$SpacedRuneCopyWithImpl(this._value, this._then);

// ignore: unused_field
// ignore: unused_field
final $Val _value;
// ignore: unused_field
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
Expand Down Expand Up @@ -1618,9 +1614,9 @@ class _$TermsCopyWithImpl<$Res, $Val extends Terms>
implements $TermsCopyWith<$Res> {
_$TermsCopyWithImpl(this._value, this._then);

// ignore: unused_field
// ignore: unused_field
final $Val _value;
// ignore: unused_field
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
Expand Down
4 changes: 2 additions & 2 deletions lib/src/frb_generated.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0.
// Generated by `flutter_rust_bridge`@ 2.1.0.

// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field

Expand Down Expand Up @@ -54,7 +54,7 @@ class OrdDart extends BaseEntrypoint<OrdDartApi, OrdDartApiImpl, OrdDartWire> {
kDefaultExternalLibraryLoaderConfig;

@override
String get codegenVersion => '2.0.0';
String get codegenVersion => '2.1.0';

@override
int get rustContentHash => 286598445;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/frb_generated.io.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0.
// Generated by `flutter_rust_bridge`@ 2.1.0.

// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field

Expand Down
2 changes: 1 addition & 1 deletion lib/src/frb_generated.web.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0.
// Generated by `flutter_rust_bridge`@ 2.1.0.

// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
flutter:
sdk: flutter

flutter_rust_bridge: '>=2.0.0 <2.1.0'
flutter_rust_bridge: '>=2.1.0 <2.2.0'
freezed_annotation: ^2.2.0
meta: ^1.12.0

Expand Down
16 changes: 8 additions & 8 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ edition = "2021"
crate-type = ["cdylib", "staticlib"]

[dependencies]
bitcoin = "0.30.2"
flutter_rust_bridge = { package = "flutter_rust_bridge", version = "=2.0.0" }
hex = "0.4.3"
ordinals = "0.0.8"
bitcoin = "=0.30.2"
hex = "=0.4.3"
ordinals = "=0.0.8"

[dependencies.flutter_rust_bridge]
package = "flutter_rust_bridge"
version = "=2.1.0"

[build-dependencies]
flutter_rust_bridge_codegen = { version = "2.0.0" }
anyhow = { version = "1.0.64", features = ["backtrace"] }
anyhow = { version = "1.0.86", features = ["backtrace"] }
flutter_rust_bridge_codegen = "2.1"
44 changes: 38 additions & 6 deletions rust/src/frb_generated.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.0.0.
// Generated by `flutter_rust_bridge`@ 2.1.0.

#![allow(
non_camel_case_types,
Expand Down Expand Up @@ -36,7 +36,7 @@ flutter_rust_bridge::frb_generated_boilerplate!(
default_rust_opaque = RustOpaqueMoi,
default_rust_auto_opaque = RustAutoOpaqueMoi,
);
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0";
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.1.0";
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 286598445;

// Section: executor
Expand Down Expand Up @@ -1883,14 +1883,46 @@ impl SseEncode for () {
}

#[cfg(not(target_family = "wasm"))]
#[path = "frb_generated.io.rs"]
mod io;
mod io {
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.1.0.

// Section: imports

use super::*;
use flutter_rust_bridge::for_generated::byteorder::{
NativeEndian, ReadBytesExt, WriteBytesExt,
};
use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
use flutter_rust_bridge::{Handler, IntoIntoDart};

// Section: boilerplate

flutter_rust_bridge::frb_generated_boilerplate_io!();
}
#[cfg(not(target_family = "wasm"))]
pub use io::*;

/// cbindgen:ignore
#[cfg(target_family = "wasm")]
#[path = "frb_generated.web.rs"]
mod web;
mod web {
// This file is automatically generated, so please do not edit it.
// Generated by `flutter_rust_bridge`@ 2.1.0.

// Section: imports

use super::*;
use flutter_rust_bridge::for_generated::byteorder::{
NativeEndian, ReadBytesExt, WriteBytesExt,
};
use flutter_rust_bridge::for_generated::wasm_bindgen;
use flutter_rust_bridge::for_generated::wasm_bindgen::prelude::*;
use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
use flutter_rust_bridge::{Handler, IntoIntoDart};

// Section: boilerplate

flutter_rust_bridge::frb_generated_boilerplate_web!();
}
#[cfg(target_family = "wasm")]
pub use web::*;

0 comments on commit 3795d93

Please sign in to comment.