Skip to content

Commit

Permalink
Fix error handling in Dart bridge layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Dampfwalze committed Apr 11, 2024
1 parent ce2eb84 commit 440e308
Show file tree
Hide file tree
Showing 6 changed files with 1,081 additions and 74 deletions.
21 changes: 20 additions & 1 deletion rust/bindings/dart_vdd/lib/src/generated/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,31 @@ class VirtualDisplayDriver extends RustOpaque {
/// current state of the driver.
///
/// After calling, will instantly emit the current state of the driver.
Future<Stream<List<Monitor>>> get stream =>
Stream<List<Monitor>> get stream =>
RustLib.instance.api.virtualDisplayDriverStream(
that: this,
);
}

@freezed
sealed class IpcError with _$IpcError implements FrbException {
const IpcError._();

const factory IpcError.serDe(
String field0,
) = IpcError_SerDe;
const factory IpcError.io(
String field0,
) = IpcError_Io;
const factory IpcError.win(
String field0,
) = IpcError_Win;
const factory IpcError.client(
String field0,
) = IpcError_Client;
const factory IpcError.requestState() = IpcError_RequestState;
}

@freezed
class Mode with _$Mode {
const factory Mode({
Expand Down
Loading

0 comments on commit 440e308

Please sign in to comment.