-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,456 additions
and
226 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// This file is automatically generated, so please do not edit it. | ||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. | ||
|
||
// 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'; | ||
|
||
// Rust type: RustOpaqueNom<flutter_rust_bridge::for_generated::rust_async::RwLock<RsProcess>> | ||
@sealed | ||
class RsProcess extends RustOpaque { | ||
RsProcess.dcoDecode(List<dynamic> wire) : super.dcoDecode(wire, _kStaticData); | ||
|
||
RsProcess.sseDecode(int ptr, int externalSizeOnNative) | ||
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData); | ||
|
||
static final _kStaticData = RustArcStaticData( | ||
rustArcIncrementStrongCount: | ||
RustLib.instance.api.rust_arc_increment_strong_count_RsProcess, | ||
rustArcDecrementStrongCount: | ||
RustLib.instance.api.rust_arc_decrement_strong_count_RsProcess, | ||
rustArcDecrementStrongCountPtr: | ||
RustLib.instance.api.rust_arc_decrement_strong_count_RsProcessPtr, | ||
); | ||
|
||
int? getPid({dynamic hint}) => | ||
RustLib.instance.api.rsProcessGetPid(that: this, hint: hint); | ||
|
||
factory RsProcess({dynamic hint}) => | ||
RustLib.instance.api.rsProcessNew(hint: hint); | ||
|
||
Stream<RsProcessStreamData> start( | ||
{required String executable, | ||
required List<String> arguments, | ||
required String workingDirectory, | ||
dynamic hint}) => | ||
RustLib.instance.api.rsProcessStart( | ||
that: this, | ||
executable: executable, | ||
arguments: arguments, | ||
workingDirectory: workingDirectory, | ||
hint: hint); | ||
|
||
Future<void> write({required String data, dynamic hint}) => | ||
RustLib.instance.api.rsProcessWrite(that: this, data: data, hint: hint); | ||
} | ||
|
||
class RsProcessStreamData { | ||
final RsProcessStreamDataType dataType; | ||
final String data; | ||
|
||
const RsProcessStreamData({ | ||
required this.dataType, | ||
required this.data, | ||
}); | ||
|
||
@override | ||
int get hashCode => dataType.hashCode ^ data.hashCode; | ||
|
||
@override | ||
bool operator ==(Object other) => | ||
identical(this, other) || | ||
other is RsProcessStreamData && | ||
runtimeType == other.runtimeType && | ||
dataType == other.dataType && | ||
data == other.data; | ||
} | ||
|
||
enum RsProcessStreamDataType { | ||
output, | ||
error, | ||
exit, | ||
; | ||
} |
Oops, something went wrong.