mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-24 00:03:45 +08:00
60 lines
1.8 KiB
Dart
60 lines
1.8 KiB
Dart
// 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 '../http_package.dart';
|
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
|
|
|
Future<void> setDefaultHeader(
|
|
{required Map<String, String> headers, dynamic hint}) =>
|
|
RustLib.instance.api.setDefaultHeader(headers: headers, hint: hint);
|
|
|
|
Future<RustHttpResponse> fetch(
|
|
{required MyMethod method,
|
|
required String url,
|
|
Map<String, String>? headers,
|
|
Uint8List? inputData,
|
|
dynamic hint}) =>
|
|
RustLib.instance.api.fetch(
|
|
method: method,
|
|
url: url,
|
|
headers: headers,
|
|
inputData: inputData,
|
|
hint: hint);
|
|
|
|
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,
|
|
post,
|
|
put,
|
|
delete,
|
|
head,
|
|
trace,
|
|
connect,
|
|
patch,
|
|
}
|