mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-06-28 09:04:45 +08:00
upgrade: flutter_rust_bridge
@ 2.0.0-dev.27.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
// This file is automatically generated, so please do not edit it.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.25.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.27.
|
||||
|
||||
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||
|
||||
@ -27,25 +27,6 @@ Future<RustHttpResponse> fetch(
|
||||
Future<List<String>> dnsLookupTxt({required String host, dynamic hint}) =>
|
||||
RustLib.instance.api.dnsLookupTxt(host: host, hint: hint);
|
||||
|
||||
// Rust type: RustOpaqueMoi<flutter_rust_bridge::for_generated::rust_async::RwLock<reqwest :: Version>>
|
||||
@sealed
|
||||
class ReqwestVersion extends RustOpaque {
|
||||
ReqwestVersion.dcoDecode(List<dynamic> wire)
|
||||
: super.dcoDecode(wire, _kStaticData);
|
||||
|
||||
ReqwestVersion.sseDecode(int ptr, int externalSizeOnNative)
|
||||
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData);
|
||||
|
||||
static final _kStaticData = RustArcStaticData(
|
||||
rustArcIncrementStrongCount:
|
||||
RustLib.instance.api.rust_arc_increment_strong_count_ReqwestVersion,
|
||||
rustArcDecrementStrongCount:
|
||||
RustLib.instance.api.rust_arc_decrement_strong_count_ReqwestVersion,
|
||||
rustArcDecrementStrongCountPtr:
|
||||
RustLib.instance.api.rust_arc_decrement_strong_count_ReqwestVersionPtr,
|
||||
);
|
||||
}
|
||||
|
||||
enum MyMethod {
|
||||
options,
|
||||
gets,
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This file is automatically generated, so please do not edit it.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.25.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.27.
|
||||
|
||||
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||
|
||||
|
@ -1,64 +0,0 @@
|
||||
// This file is automatically generated, so please do not edit it.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.24.
|
||||
|
||||
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||
|
||||
import 'frb_generated.dart';
|
||||
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart' hide protected;
|
||||
part 'downloader.freezed.dart';
|
||||
|
||||
class DownloadCallbackData {
|
||||
final String id;
|
||||
final int total;
|
||||
final int progress;
|
||||
final int speed;
|
||||
final MyDownloaderStatus status;
|
||||
|
||||
const DownloadCallbackData({
|
||||
required this.id,
|
||||
required this.total,
|
||||
required this.progress,
|
||||
required this.speed,
|
||||
required this.status,
|
||||
});
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
id.hashCode ^
|
||||
total.hashCode ^
|
||||
progress.hashCode ^
|
||||
speed.hashCode ^
|
||||
status.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is DownloadCallbackData &&
|
||||
runtimeType == other.runtimeType &&
|
||||
id == other.id &&
|
||||
total == other.total &&
|
||||
progress == other.progress &&
|
||||
speed == other.speed &&
|
||||
status == other.status;
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class MyDownloaderStatus with _$MyDownloaderStatus {
|
||||
const factory MyDownloaderStatus.noStart() = MyDownloaderStatus_NoStart;
|
||||
const factory MyDownloaderStatus.running() = MyDownloaderStatus_Running;
|
||||
const factory MyDownloaderStatus.pending(
|
||||
MyNetworkItemPendingType field0,
|
||||
) = MyDownloaderStatus_Pending;
|
||||
const factory MyDownloaderStatus.error(
|
||||
String field0,
|
||||
) = MyDownloaderStatus_Error;
|
||||
const factory MyDownloaderStatus.finished() = MyDownloaderStatus_Finished;
|
||||
}
|
||||
|
||||
enum MyNetworkItemPendingType {
|
||||
queueUp,
|
||||
starting,
|
||||
stopping,
|
||||
initializing,
|
||||
}
|
@ -1,778 +0,0 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'downloader.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$MyDownloaderStatus {
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() noStart,
|
||||
required TResult Function() running,
|
||||
required TResult Function(MyNetworkItemPendingType field0) pending,
|
||||
required TResult Function(String field0) error,
|
||||
required TResult Function() finished,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? noStart,
|
||||
TResult? Function()? running,
|
||||
TResult? Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult? Function(String field0)? error,
|
||||
TResult? Function()? finished,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? noStart,
|
||||
TResult Function()? running,
|
||||
TResult Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult Function(String field0)? error,
|
||||
TResult Function()? finished,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(MyDownloaderStatus_NoStart value) noStart,
|
||||
required TResult Function(MyDownloaderStatus_Running value) running,
|
||||
required TResult Function(MyDownloaderStatus_Pending value) pending,
|
||||
required TResult Function(MyDownloaderStatus_Error value) error,
|
||||
required TResult Function(MyDownloaderStatus_Finished value) finished,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult? Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult? Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult? Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult? Function(MyDownloaderStatus_Finished value)? finished,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult Function(MyDownloaderStatus_Finished value)? finished,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $MyDownloaderStatusCopyWith<$Res> {
|
||||
factory $MyDownloaderStatusCopyWith(
|
||||
MyDownloaderStatus value, $Res Function(MyDownloaderStatus) then) =
|
||||
_$MyDownloaderStatusCopyWithImpl<$Res, MyDownloaderStatus>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$MyDownloaderStatusCopyWithImpl<$Res, $Val extends MyDownloaderStatus>
|
||||
implements $MyDownloaderStatusCopyWith<$Res> {
|
||||
_$MyDownloaderStatusCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$MyDownloaderStatus_NoStartImplCopyWith<$Res> {
|
||||
factory _$$MyDownloaderStatus_NoStartImplCopyWith(
|
||||
_$MyDownloaderStatus_NoStartImpl value,
|
||||
$Res Function(_$MyDownloaderStatus_NoStartImpl) then) =
|
||||
__$$MyDownloaderStatus_NoStartImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$MyDownloaderStatus_NoStartImplCopyWithImpl<$Res>
|
||||
extends _$MyDownloaderStatusCopyWithImpl<$Res,
|
||||
_$MyDownloaderStatus_NoStartImpl>
|
||||
implements _$$MyDownloaderStatus_NoStartImplCopyWith<$Res> {
|
||||
__$$MyDownloaderStatus_NoStartImplCopyWithImpl(
|
||||
_$MyDownloaderStatus_NoStartImpl _value,
|
||||
$Res Function(_$MyDownloaderStatus_NoStartImpl) _then)
|
||||
: super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$MyDownloaderStatus_NoStartImpl implements MyDownloaderStatus_NoStart {
|
||||
const _$MyDownloaderStatus_NoStartImpl();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MyDownloaderStatus.noStart()';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$MyDownloaderStatus_NoStartImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => runtimeType.hashCode;
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() noStart,
|
||||
required TResult Function() running,
|
||||
required TResult Function(MyNetworkItemPendingType field0) pending,
|
||||
required TResult Function(String field0) error,
|
||||
required TResult Function() finished,
|
||||
}) {
|
||||
return noStart();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? noStart,
|
||||
TResult? Function()? running,
|
||||
TResult? Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult? Function(String field0)? error,
|
||||
TResult? Function()? finished,
|
||||
}) {
|
||||
return noStart?.call();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? noStart,
|
||||
TResult Function()? running,
|
||||
TResult Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult Function(String field0)? error,
|
||||
TResult Function()? finished,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (noStart != null) {
|
||||
return noStart();
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(MyDownloaderStatus_NoStart value) noStart,
|
||||
required TResult Function(MyDownloaderStatus_Running value) running,
|
||||
required TResult Function(MyDownloaderStatus_Pending value) pending,
|
||||
required TResult Function(MyDownloaderStatus_Error value) error,
|
||||
required TResult Function(MyDownloaderStatus_Finished value) finished,
|
||||
}) {
|
||||
return noStart(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult? Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult? Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult? Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult? Function(MyDownloaderStatus_Finished value)? finished,
|
||||
}) {
|
||||
return noStart?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult Function(MyDownloaderStatus_Finished value)? finished,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (noStart != null) {
|
||||
return noStart(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class MyDownloaderStatus_NoStart implements MyDownloaderStatus {
|
||||
const factory MyDownloaderStatus_NoStart() = _$MyDownloaderStatus_NoStartImpl;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$MyDownloaderStatus_RunningImplCopyWith<$Res> {
|
||||
factory _$$MyDownloaderStatus_RunningImplCopyWith(
|
||||
_$MyDownloaderStatus_RunningImpl value,
|
||||
$Res Function(_$MyDownloaderStatus_RunningImpl) then) =
|
||||
__$$MyDownloaderStatus_RunningImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$MyDownloaderStatus_RunningImplCopyWithImpl<$Res>
|
||||
extends _$MyDownloaderStatusCopyWithImpl<$Res,
|
||||
_$MyDownloaderStatus_RunningImpl>
|
||||
implements _$$MyDownloaderStatus_RunningImplCopyWith<$Res> {
|
||||
__$$MyDownloaderStatus_RunningImplCopyWithImpl(
|
||||
_$MyDownloaderStatus_RunningImpl _value,
|
||||
$Res Function(_$MyDownloaderStatus_RunningImpl) _then)
|
||||
: super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$MyDownloaderStatus_RunningImpl implements MyDownloaderStatus_Running {
|
||||
const _$MyDownloaderStatus_RunningImpl();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MyDownloaderStatus.running()';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$MyDownloaderStatus_RunningImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => runtimeType.hashCode;
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() noStart,
|
||||
required TResult Function() running,
|
||||
required TResult Function(MyNetworkItemPendingType field0) pending,
|
||||
required TResult Function(String field0) error,
|
||||
required TResult Function() finished,
|
||||
}) {
|
||||
return running();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? noStart,
|
||||
TResult? Function()? running,
|
||||
TResult? Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult? Function(String field0)? error,
|
||||
TResult? Function()? finished,
|
||||
}) {
|
||||
return running?.call();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? noStart,
|
||||
TResult Function()? running,
|
||||
TResult Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult Function(String field0)? error,
|
||||
TResult Function()? finished,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (running != null) {
|
||||
return running();
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(MyDownloaderStatus_NoStart value) noStart,
|
||||
required TResult Function(MyDownloaderStatus_Running value) running,
|
||||
required TResult Function(MyDownloaderStatus_Pending value) pending,
|
||||
required TResult Function(MyDownloaderStatus_Error value) error,
|
||||
required TResult Function(MyDownloaderStatus_Finished value) finished,
|
||||
}) {
|
||||
return running(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult? Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult? Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult? Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult? Function(MyDownloaderStatus_Finished value)? finished,
|
||||
}) {
|
||||
return running?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult Function(MyDownloaderStatus_Finished value)? finished,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (running != null) {
|
||||
return running(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class MyDownloaderStatus_Running implements MyDownloaderStatus {
|
||||
const factory MyDownloaderStatus_Running() = _$MyDownloaderStatus_RunningImpl;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$MyDownloaderStatus_PendingImplCopyWith<$Res> {
|
||||
factory _$$MyDownloaderStatus_PendingImplCopyWith(
|
||||
_$MyDownloaderStatus_PendingImpl value,
|
||||
$Res Function(_$MyDownloaderStatus_PendingImpl) then) =
|
||||
__$$MyDownloaderStatus_PendingImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({MyNetworkItemPendingType field0});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$MyDownloaderStatus_PendingImplCopyWithImpl<$Res>
|
||||
extends _$MyDownloaderStatusCopyWithImpl<$Res,
|
||||
_$MyDownloaderStatus_PendingImpl>
|
||||
implements _$$MyDownloaderStatus_PendingImplCopyWith<$Res> {
|
||||
__$$MyDownloaderStatus_PendingImplCopyWithImpl(
|
||||
_$MyDownloaderStatus_PendingImpl _value,
|
||||
$Res Function(_$MyDownloaderStatus_PendingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? field0 = null,
|
||||
}) {
|
||||
return _then(_$MyDownloaderStatus_PendingImpl(
|
||||
null == field0
|
||||
? _value.field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as MyNetworkItemPendingType,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$MyDownloaderStatus_PendingImpl implements MyDownloaderStatus_Pending {
|
||||
const _$MyDownloaderStatus_PendingImpl(this.field0);
|
||||
|
||||
@override
|
||||
final MyNetworkItemPendingType field0;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MyDownloaderStatus.pending(field0: $field0)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$MyDownloaderStatus_PendingImpl &&
|
||||
(identical(other.field0, field0) || other.field0 == field0));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, field0);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$MyDownloaderStatus_PendingImplCopyWith<_$MyDownloaderStatus_PendingImpl>
|
||||
get copyWith => __$$MyDownloaderStatus_PendingImplCopyWithImpl<
|
||||
_$MyDownloaderStatus_PendingImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() noStart,
|
||||
required TResult Function() running,
|
||||
required TResult Function(MyNetworkItemPendingType field0) pending,
|
||||
required TResult Function(String field0) error,
|
||||
required TResult Function() finished,
|
||||
}) {
|
||||
return pending(field0);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? noStart,
|
||||
TResult? Function()? running,
|
||||
TResult? Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult? Function(String field0)? error,
|
||||
TResult? Function()? finished,
|
||||
}) {
|
||||
return pending?.call(field0);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? noStart,
|
||||
TResult Function()? running,
|
||||
TResult Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult Function(String field0)? error,
|
||||
TResult Function()? finished,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (pending != null) {
|
||||
return pending(field0);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(MyDownloaderStatus_NoStart value) noStart,
|
||||
required TResult Function(MyDownloaderStatus_Running value) running,
|
||||
required TResult Function(MyDownloaderStatus_Pending value) pending,
|
||||
required TResult Function(MyDownloaderStatus_Error value) error,
|
||||
required TResult Function(MyDownloaderStatus_Finished value) finished,
|
||||
}) {
|
||||
return pending(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult? Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult? Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult? Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult? Function(MyDownloaderStatus_Finished value)? finished,
|
||||
}) {
|
||||
return pending?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult Function(MyDownloaderStatus_Finished value)? finished,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (pending != null) {
|
||||
return pending(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class MyDownloaderStatus_Pending implements MyDownloaderStatus {
|
||||
const factory MyDownloaderStatus_Pending(
|
||||
final MyNetworkItemPendingType field0) = _$MyDownloaderStatus_PendingImpl;
|
||||
|
||||
MyNetworkItemPendingType get field0;
|
||||
@JsonKey(ignore: true)
|
||||
_$$MyDownloaderStatus_PendingImplCopyWith<_$MyDownloaderStatus_PendingImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$MyDownloaderStatus_ErrorImplCopyWith<$Res> {
|
||||
factory _$$MyDownloaderStatus_ErrorImplCopyWith(
|
||||
_$MyDownloaderStatus_ErrorImpl value,
|
||||
$Res Function(_$MyDownloaderStatus_ErrorImpl) then) =
|
||||
__$$MyDownloaderStatus_ErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String field0});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$MyDownloaderStatus_ErrorImplCopyWithImpl<$Res>
|
||||
extends _$MyDownloaderStatusCopyWithImpl<$Res,
|
||||
_$MyDownloaderStatus_ErrorImpl>
|
||||
implements _$$MyDownloaderStatus_ErrorImplCopyWith<$Res> {
|
||||
__$$MyDownloaderStatus_ErrorImplCopyWithImpl(
|
||||
_$MyDownloaderStatus_ErrorImpl _value,
|
||||
$Res Function(_$MyDownloaderStatus_ErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? field0 = null,
|
||||
}) {
|
||||
return _then(_$MyDownloaderStatus_ErrorImpl(
|
||||
null == field0
|
||||
? _value.field0
|
||||
: field0 // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$MyDownloaderStatus_ErrorImpl implements MyDownloaderStatus_Error {
|
||||
const _$MyDownloaderStatus_ErrorImpl(this.field0);
|
||||
|
||||
@override
|
||||
final String field0;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MyDownloaderStatus.error(field0: $field0)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$MyDownloaderStatus_ErrorImpl &&
|
||||
(identical(other.field0, field0) || other.field0 == field0));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, field0);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$MyDownloaderStatus_ErrorImplCopyWith<_$MyDownloaderStatus_ErrorImpl>
|
||||
get copyWith => __$$MyDownloaderStatus_ErrorImplCopyWithImpl<
|
||||
_$MyDownloaderStatus_ErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() noStart,
|
||||
required TResult Function() running,
|
||||
required TResult Function(MyNetworkItemPendingType field0) pending,
|
||||
required TResult Function(String field0) error,
|
||||
required TResult Function() finished,
|
||||
}) {
|
||||
return error(field0);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? noStart,
|
||||
TResult? Function()? running,
|
||||
TResult? Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult? Function(String field0)? error,
|
||||
TResult? Function()? finished,
|
||||
}) {
|
||||
return error?.call(field0);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? noStart,
|
||||
TResult Function()? running,
|
||||
TResult Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult Function(String field0)? error,
|
||||
TResult Function()? finished,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (error != null) {
|
||||
return error(field0);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(MyDownloaderStatus_NoStart value) noStart,
|
||||
required TResult Function(MyDownloaderStatus_Running value) running,
|
||||
required TResult Function(MyDownloaderStatus_Pending value) pending,
|
||||
required TResult Function(MyDownloaderStatus_Error value) error,
|
||||
required TResult Function(MyDownloaderStatus_Finished value) finished,
|
||||
}) {
|
||||
return error(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult? Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult? Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult? Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult? Function(MyDownloaderStatus_Finished value)? finished,
|
||||
}) {
|
||||
return error?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult Function(MyDownloaderStatus_Finished value)? finished,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (error != null) {
|
||||
return error(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class MyDownloaderStatus_Error implements MyDownloaderStatus {
|
||||
const factory MyDownloaderStatus_Error(final String field0) =
|
||||
_$MyDownloaderStatus_ErrorImpl;
|
||||
|
||||
String get field0;
|
||||
@JsonKey(ignore: true)
|
||||
_$$MyDownloaderStatus_ErrorImplCopyWith<_$MyDownloaderStatus_ErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$MyDownloaderStatus_FinishedImplCopyWith<$Res> {
|
||||
factory _$$MyDownloaderStatus_FinishedImplCopyWith(
|
||||
_$MyDownloaderStatus_FinishedImpl value,
|
||||
$Res Function(_$MyDownloaderStatus_FinishedImpl) then) =
|
||||
__$$MyDownloaderStatus_FinishedImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$MyDownloaderStatus_FinishedImplCopyWithImpl<$Res>
|
||||
extends _$MyDownloaderStatusCopyWithImpl<$Res,
|
||||
_$MyDownloaderStatus_FinishedImpl>
|
||||
implements _$$MyDownloaderStatus_FinishedImplCopyWith<$Res> {
|
||||
__$$MyDownloaderStatus_FinishedImplCopyWithImpl(
|
||||
_$MyDownloaderStatus_FinishedImpl _value,
|
||||
$Res Function(_$MyDownloaderStatus_FinishedImpl) _then)
|
||||
: super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$MyDownloaderStatus_FinishedImpl implements MyDownloaderStatus_Finished {
|
||||
const _$MyDownloaderStatus_FinishedImpl();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MyDownloaderStatus.finished()';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$MyDownloaderStatus_FinishedImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => runtimeType.hashCode;
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function() noStart,
|
||||
required TResult Function() running,
|
||||
required TResult Function(MyNetworkItemPendingType field0) pending,
|
||||
required TResult Function(String field0) error,
|
||||
required TResult Function() finished,
|
||||
}) {
|
||||
return finished();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function()? noStart,
|
||||
TResult? Function()? running,
|
||||
TResult? Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult? Function(String field0)? error,
|
||||
TResult? Function()? finished,
|
||||
}) {
|
||||
return finished?.call();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function()? noStart,
|
||||
TResult Function()? running,
|
||||
TResult Function(MyNetworkItemPendingType field0)? pending,
|
||||
TResult Function(String field0)? error,
|
||||
TResult Function()? finished,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (finished != null) {
|
||||
return finished();
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(MyDownloaderStatus_NoStart value) noStart,
|
||||
required TResult Function(MyDownloaderStatus_Running value) running,
|
||||
required TResult Function(MyDownloaderStatus_Pending value) pending,
|
||||
required TResult Function(MyDownloaderStatus_Error value) error,
|
||||
required TResult Function(MyDownloaderStatus_Finished value) finished,
|
||||
}) {
|
||||
return finished(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult? Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult? Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult? Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult? Function(MyDownloaderStatus_Finished value)? finished,
|
||||
}) {
|
||||
return finished?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(MyDownloaderStatus_NoStart value)? noStart,
|
||||
TResult Function(MyDownloaderStatus_Running value)? running,
|
||||
TResult Function(MyDownloaderStatus_Pending value)? pending,
|
||||
TResult Function(MyDownloaderStatus_Error value)? error,
|
||||
TResult Function(MyDownloaderStatus_Finished value)? finished,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (finished != null) {
|
||||
return finished(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class MyDownloaderStatus_Finished implements MyDownloaderStatus {
|
||||
const factory MyDownloaderStatus_Finished() =
|
||||
_$MyDownloaderStatus_FinishedImpl;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
// This file is automatically generated, so please do not edit it.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.25.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.27.
|
||||
|
||||
// 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
|
||||
|
||||
@ -53,7 +53,7 @@ class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {
|
||||
kDefaultExternalLibraryLoaderConfig;
|
||||
|
||||
@override
|
||||
String get codegenVersion => '2.0.0-dev.25';
|
||||
String get codegenVersion => '2.0.0-dev.27';
|
||||
|
||||
static const kDefaultExternalLibraryLoaderConfig =
|
||||
ExternalLibraryLoaderConfig(
|
||||
@ -81,15 +81,6 @@ abstract class RustLibApi extends BaseApi {
|
||||
required List<String> arguments,
|
||||
required String workingDirectory,
|
||||
dynamic hint});
|
||||
|
||||
RustArcIncrementStrongCountFnType
|
||||
get rust_arc_increment_strong_count_ReqwestVersion;
|
||||
|
||||
RustArcDecrementStrongCountFnType
|
||||
get rust_arc_decrement_strong_count_ReqwestVersion;
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_ReqwestVersionPtr;
|
||||
}
|
||||
|
||||
class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
@ -215,28 +206,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
argNames: ["executable", "arguments", "workingDirectory"],
|
||||
);
|
||||
|
||||
RustArcIncrementStrongCountFnType
|
||||
get rust_arc_increment_strong_count_ReqwestVersion => wire
|
||||
.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion;
|
||||
|
||||
RustArcDecrementStrongCountFnType
|
||||
get rust_arc_decrement_strong_count_ReqwestVersion => wire
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion;
|
||||
|
||||
@protected
|
||||
AnyhowException dco_decode_AnyhowException(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
return AnyhowException(raw as String);
|
||||
}
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
return ReqwestVersion.dcoDecode(raw as List<dynamic>);
|
||||
}
|
||||
|
||||
@protected
|
||||
Map<String, String> dco_decode_Map_String_String(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
@ -244,14 +219,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
.map((e) => MapEntry(e.$1, e.$2)));
|
||||
}
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
return ReqwestVersion.dcoDecode(raw as List<dynamic>);
|
||||
}
|
||||
|
||||
@protected
|
||||
String dco_decode_String(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
@ -288,6 +255,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
return (raw as List<dynamic>).map(dco_decode_record_string_string).toList();
|
||||
}
|
||||
|
||||
@protected
|
||||
MyHttpVersion dco_decode_my_http_version(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
return MyHttpVersion.values[raw as int];
|
||||
}
|
||||
|
||||
@protected
|
||||
MyMethod dco_decode_my_method(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
@ -336,9 +309,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
headers: dco_decode_Map_String_String(arr[1]),
|
||||
url: dco_decode_String(arr[2]),
|
||||
contentLength: dco_decode_opt_box_autoadd_u_64(arr[3]),
|
||||
version:
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
arr[4]),
|
||||
version: dco_decode_my_http_version(arr[4]),
|
||||
remoteAddr: dco_decode_String(arr[5]),
|
||||
data: dco_decode_opt_list_prim_u_8_strict(arr[6]),
|
||||
);
|
||||
@ -368,12 +339,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
return;
|
||||
}
|
||||
|
||||
@protected
|
||||
int dco_decode_usize(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
return dcoDecodeI64OrU64(raw);
|
||||
}
|
||||
|
||||
@protected
|
||||
AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
@ -381,15 +346,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
return AnyhowException(inner);
|
||||
}
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
return ReqwestVersion.sseDecode(
|
||||
sse_decode_usize(deserializer), sse_decode_i_32(deserializer));
|
||||
}
|
||||
|
||||
@protected
|
||||
Map<String, String> sse_decode_Map_String_String(
|
||||
SseDeserializer deserializer) {
|
||||
@ -398,15 +354,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2)));
|
||||
}
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
return ReqwestVersion.sseDecode(
|
||||
sse_decode_usize(deserializer), sse_decode_i_32(deserializer));
|
||||
}
|
||||
|
||||
@protected
|
||||
String sse_decode_String(SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
@ -458,6 +405,13 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
return ans_;
|
||||
}
|
||||
|
||||
@protected
|
||||
MyHttpVersion sse_decode_my_http_version(SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
var inner = sse_decode_i_32(deserializer);
|
||||
return MyHttpVersion.values[inner];
|
||||
}
|
||||
|
||||
@protected
|
||||
MyMethod sse_decode_my_method(SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
@ -515,9 +469,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
var var_headers = sse_decode_Map_String_String(deserializer);
|
||||
var var_url = sse_decode_String(deserializer);
|
||||
var var_contentLength = sse_decode_opt_box_autoadd_u_64(deserializer);
|
||||
var var_version =
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
deserializer);
|
||||
var var_version = sse_decode_my_http_version(deserializer);
|
||||
var var_remoteAddr = sse_decode_String(deserializer);
|
||||
var var_data = sse_decode_opt_list_prim_u_8_strict(deserializer);
|
||||
return RustHttpResponse(
|
||||
@ -553,12 +505,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
}
|
||||
|
||||
@protected
|
||||
int sse_decode_usize(SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
return deserializer.buffer.getUint64();
|
||||
}
|
||||
|
||||
@protected
|
||||
bool sse_decode_bool(SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
@ -572,14 +518,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
throw UnimplementedError('Unreachable ((');
|
||||
}
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ReqwestVersion self, SseSerializer serializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
sse_encode_usize(self.sseEncode(move: true), serializer);
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_Map_String_String(
|
||||
Map<String, String> self, SseSerializer serializer) {
|
||||
@ -588,14 +526,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
self.entries.map((e) => (e.key, e.value)).toList(), serializer);
|
||||
}
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ReqwestVersion self, SseSerializer serializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
sse_encode_usize(self.sseEncode(move: null), serializer);
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_String(String self, SseSerializer serializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
@ -641,6 +571,13 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
}
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_my_http_version(
|
||||
MyHttpVersion self, SseSerializer serializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
sse_encode_i_32(self.index, serializer);
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_my_method(MyMethod self, SseSerializer serializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
@ -695,8 +632,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
sse_encode_Map_String_String(self.headers, serializer);
|
||||
sse_encode_String(self.url, serializer);
|
||||
sse_encode_opt_box_autoadd_u_64(self.contentLength, serializer);
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
self.version, serializer);
|
||||
sse_encode_my_http_version(self.version, serializer);
|
||||
sse_encode_String(self.remoteAddr, serializer);
|
||||
sse_encode_opt_list_prim_u_8_strict(self.data, serializer);
|
||||
}
|
||||
@ -724,12 +660,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_usize(int self, SseSerializer serializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
serializer.buffer.putUint64(self);
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_bool(bool self, SseSerializer serializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This file is automatically generated, so please do not edit it.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.25.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.27.
|
||||
|
||||
// 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
|
||||
|
||||
@ -20,26 +20,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
required super.portManager,
|
||||
});
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_ReqwestVersionPtr => wire
|
||||
._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersionPtr;
|
||||
|
||||
@protected
|
||||
AnyhowException dco_decode_AnyhowException(dynamic raw);
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
dynamic raw);
|
||||
|
||||
@protected
|
||||
Map<String, String> dco_decode_Map_String_String(dynamic raw);
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
dynamic raw);
|
||||
|
||||
@protected
|
||||
String dco_decode_String(dynamic raw);
|
||||
|
||||
@ -58,6 +44,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
List<(String, String)> dco_decode_list_record_string_string(dynamic raw);
|
||||
|
||||
@protected
|
||||
MyHttpVersion dco_decode_my_http_version(dynamic raw);
|
||||
|
||||
@protected
|
||||
MyMethod dco_decode_my_method(dynamic raw);
|
||||
|
||||
@ -88,26 +77,13 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
void dco_decode_unit(dynamic raw);
|
||||
|
||||
@protected
|
||||
int dco_decode_usize(dynamic raw);
|
||||
|
||||
@protected
|
||||
AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
Map<String, String> sse_decode_Map_String_String(
|
||||
SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
String sse_decode_String(SseDeserializer deserializer);
|
||||
|
||||
@ -127,6 +103,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
List<(String, String)> sse_decode_list_record_string_string(
|
||||
SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
MyHttpVersion sse_decode_my_http_version(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
MyMethod sse_decode_my_method(SseDeserializer deserializer);
|
||||
|
||||
@ -159,9 +138,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
void sse_decode_unit(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
int sse_decode_usize(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
bool sse_decode_bool(SseDeserializer deserializer);
|
||||
|
||||
@ -169,20 +145,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_AnyhowException(
|
||||
AnyhowException self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ReqwestVersion self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_Map_String_String(
|
||||
Map<String, String> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ReqwestVersion self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_String(String self, SseSerializer serializer);
|
||||
|
||||
@ -203,6 +169,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_list_record_string_string(
|
||||
List<(String, String)> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_my_http_version(MyHttpVersion self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_my_method(MyMethod self, SseSerializer serializer);
|
||||
|
||||
@ -237,9 +206,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
void sse_encode_unit(void self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_usize(int self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_bool(bool self, SseSerializer serializer);
|
||||
}
|
||||
@ -257,36 +223,4 @@ class RustLibWire implements BaseWire {
|
||||
/// The symbols are looked up in [dynamicLibrary].
|
||||
RustLibWire(ffi.DynamicLibrary dynamicLibrary)
|
||||
: _lookup = dynamicLibrary.lookup;
|
||||
|
||||
void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ptr,
|
||||
);
|
||||
}
|
||||
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersionPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_starcitizen_doctor_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion');
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion =
|
||||
_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersionPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ptr,
|
||||
);
|
||||
}
|
||||
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersionPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_starcitizen_doctor_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion');
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion =
|
||||
_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersionPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This file is automatically generated, so please do not edit it.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.25.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.27.
|
||||
|
||||
// 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
|
||||
|
||||
@ -19,26 +19,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
required super.portManager,
|
||||
});
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_ReqwestVersionPtr => wire
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion;
|
||||
|
||||
@protected
|
||||
AnyhowException dco_decode_AnyhowException(dynamic raw);
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
dynamic raw);
|
||||
|
||||
@protected
|
||||
Map<String, String> dco_decode_Map_String_String(dynamic raw);
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
dynamic raw);
|
||||
|
||||
@protected
|
||||
String dco_decode_String(dynamic raw);
|
||||
|
||||
@ -57,6 +43,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
List<(String, String)> dco_decode_list_record_string_string(dynamic raw);
|
||||
|
||||
@protected
|
||||
MyHttpVersion dco_decode_my_http_version(dynamic raw);
|
||||
|
||||
@protected
|
||||
MyMethod dco_decode_my_method(dynamic raw);
|
||||
|
||||
@ -87,26 +76,13 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
void dco_decode_unit(dynamic raw);
|
||||
|
||||
@protected
|
||||
int dco_decode_usize(dynamic raw);
|
||||
|
||||
@protected
|
||||
AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
Map<String, String> sse_decode_Map_String_String(
|
||||
SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ReqwestVersion
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
String sse_decode_String(SseDeserializer deserializer);
|
||||
|
||||
@ -126,6 +102,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
List<(String, String)> sse_decode_list_record_string_string(
|
||||
SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
MyHttpVersion sse_decode_my_http_version(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
MyMethod sse_decode_my_method(SseDeserializer deserializer);
|
||||
|
||||
@ -158,9 +137,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
void sse_decode_unit(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
int sse_decode_usize(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
bool sse_decode_bool(SseDeserializer deserializer);
|
||||
|
||||
@ -168,20 +144,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_AnyhowException(
|
||||
AnyhowException self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ReqwestVersion self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_Map_String_String(
|
||||
Map<String, String> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ReqwestVersion self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_String(String self, SseSerializer serializer);
|
||||
|
||||
@ -202,6 +168,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_list_record_string_string(
|
||||
List<(String, String)> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_my_http_version(MyHttpVersion self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_my_method(MyMethod self, SseSerializer serializer);
|
||||
|
||||
@ -236,9 +205,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
void sse_encode_unit(void self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_usize(int self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_bool(bool self, SseSerializer serializer);
|
||||
}
|
||||
@ -247,18 +213,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
|
||||
class RustLibWire implements BaseWire {
|
||||
RustLibWire.fromExternalLibrary(ExternalLibrary lib);
|
||||
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
dynamic ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ptr);
|
||||
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
dynamic ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
ptr);
|
||||
}
|
||||
|
||||
@JS('wasm_bindgen')
|
||||
@ -272,12 +226,4 @@ class RustLibWasmModule implements WasmModule {
|
||||
|
||||
@override
|
||||
external RustLibWasmModule bind(dynamic thisArg, String moduleName);
|
||||
|
||||
external void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
dynamic ptr);
|
||||
|
||||
external void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||
dynamic ptr);
|
||||
}
|
||||
|
@ -1,18 +1,25 @@
|
||||
// This file is automatically generated, so please do not edit it.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.25.
|
||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.27.
|
||||
|
||||
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||
|
||||
import 'api/http_api.dart';
|
||||
import 'frb_generated.dart';
|
||||
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||
|
||||
enum MyHttpVersion {
|
||||
http09,
|
||||
http10,
|
||||
http11,
|
||||
http2,
|
||||
http3,
|
||||
}
|
||||
|
||||
class RustHttpResponse {
|
||||
final int statusCode;
|
||||
final Map<String, String> headers;
|
||||
final String url;
|
||||
final int? contentLength;
|
||||
final ReqwestVersion version;
|
||||
final MyHttpVersion version;
|
||||
final String remoteAddr;
|
||||
final Uint8List? data;
|
||||
|
||||
|
Reference in New Issue
Block a user