mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-09-01 20:44:07 +00:00
39 lines
1.5 KiB
Dart
39 lines
1.5 KiB
Dart
// This file is automatically generated, so please do not edit it.
|
|
// @generated by `flutter_rust_bridge`@ 2.12.0.
|
|
|
|
// 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';
|
|
|
|
// These functions are ignored because they are not marked as `pub`: `get_twonly_flutter`
|
|
// These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `AnnouncedUser`, `OtherPromotion`, `TwonlyFlutter`
|
|
|
|
Future<void> initializeTwonlyFlutter({required InitConfig config}) =>
|
|
RustLib.instance.api.crateBridgeInitializeTwonlyFlutter(config: config);
|
|
|
|
/// Initializes the complete Rust runtime without Flutter or callback setup.
|
|
/// Background executables should call this before using `RustApi`.
|
|
Future<void> initializeTwonlyStandalone({required InitConfig config}) =>
|
|
RustLib.instance.api.crateBridgeInitializeTwonlyStandalone(config: config);
|
|
|
|
class InitConfig {
|
|
final String databaseDir;
|
|
final String dataDir;
|
|
|
|
const InitConfig({
|
|
required this.databaseDir,
|
|
required this.dataDir,
|
|
});
|
|
|
|
@override
|
|
int get hashCode => databaseDir.hashCode ^ dataDir.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is InitConfig &&
|
|
runtimeType == other.runtimeType &&
|
|
databaseDir == other.databaseDir &&
|
|
dataDir == other.dataDir;
|
|
}
|