mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-09-01 10:44:07 +00:00
48 lines
1.5 KiB
Dart
48 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 function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `fmt`
|
|
|
|
/// Adds a Dart record to the Rust-owned application log.
|
|
///
|
|
/// This only performs a short, serialized append and is synchronous so Dart
|
|
/// records cannot be reordered by a collection of unawaited futures.
|
|
void writeLog({
|
|
required LogLevel level,
|
|
required String source,
|
|
required String message,
|
|
required bool inBackground,
|
|
}) => RustLib.instance.api.crateBridgeLoggingWriteLog(
|
|
level: level,
|
|
source: source,
|
|
message: message,
|
|
inBackground: inBackground,
|
|
);
|
|
|
|
Future<String> loadLogFile() =>
|
|
RustLib.instance.api.crateBridgeLoggingLoadLogFile();
|
|
|
|
Future<String> readLastLogLines({required int lineCount}) => RustLib
|
|
.instance
|
|
.api
|
|
.crateBridgeLoggingReadLastLogLines(lineCount: lineCount);
|
|
|
|
Future<void> cleanLogFile() =>
|
|
RustLib.instance.api.crateBridgeLoggingCleanLogFile();
|
|
|
|
/// Truncates `app.log` through its owner instead of unlinking an open file.
|
|
Future<bool> clearLogFile() =>
|
|
RustLib.instance.api.crateBridgeLoggingClearLogFile();
|
|
|
|
enum LogLevel {
|
|
finest,
|
|
fine,
|
|
info,
|
|
warning,
|
|
shout,
|
|
}
|