Skip to content

Commit 440e308

Browse files
committed
Fix error handling in Dart bridge layer
1 parent ce2eb84 commit 440e308

File tree

6 files changed

+1081
-74
lines changed

6 files changed

+1081
-74
lines changed

rust/bindings/dart_vdd/lib/src/generated/api.dart

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,31 @@ class VirtualDisplayDriver extends RustOpaque {
9393
/// current state of the driver.
9494
///
9595
/// After calling, will instantly emit the current state of the driver.
96-
Future<Stream<List<Monitor>>> get stream =>
96+
Stream<List<Monitor>> get stream =>
9797
RustLib.instance.api.virtualDisplayDriverStream(
9898
that: this,
9999
);
100100
}
101101

102+
@freezed
103+
sealed class IpcError with _$IpcError implements FrbException {
104+
const IpcError._();
105+
106+
const factory IpcError.serDe(
107+
String field0,
108+
) = IpcError_SerDe;
109+
const factory IpcError.io(
110+
String field0,
111+
) = IpcError_Io;
112+
const factory IpcError.win(
113+
String field0,
114+
) = IpcError_Win;
115+
const factory IpcError.client(
116+
String field0,
117+
) = IpcError_Client;
118+
const factory IpcError.requestState() = IpcError_RequestState;
119+
}
120+
102121
@freezed
103122
class Mode with _$Mode {
104123
const factory Mode({

0 commit comments

Comments
 (0)