@@ -81,6 +81,8 @@ pub const Error = error{
81
81
Cancelled ,
82
82
MemoryAlreadyMapped ,
83
83
84
+ CrcNotMatch ,
85
+
84
86
FormatNotSupported ,
85
87
DeviceTypeNotSupported ,
86
88
ShareModeNotSupported ,
@@ -89,6 +91,7 @@ pub const Error = error{
89
91
ApiNotFound ,
90
92
InvalidDeviceConfig ,
91
93
Loop ,
94
+ BackendNotEnabled ,
92
95
93
96
DeviceNotInitialized ,
94
97
DeviceAlreadyInitialized ,
@@ -156,24 +159,27 @@ pub const Result = enum(i32) {
156
159
cancelled = -51 ,
157
160
memory_already_mapped = -52 ,
158
161
159
- format_not_supported = -100 ,
160
- device_type_not_supported = -101 ,
161
- share_mode_not_supported = -102 ,
162
- no_backend = -103 ,
163
- no_device = -104 ,
164
- api_not_found = -105 ,
165
- invalid_device_config = -106 ,
166
- loop = -107 ,
167
-
168
- device_not_initialized = -200 ,
169
- device_already_initialized = -201 ,
170
- device_not_started = -202 ,
171
- device_not_stopped = -203 ,
172
-
173
- failed_to_init_backend = -300 ,
174
- failed_to_open_backend_device = -301 ,
175
- failed_to_start_backend_device = -302 ,
176
- failed_to_stop_backend_device = -303 ,
162
+ crc_not_match = -100 ,
163
+
164
+ format_not_supported = -200 ,
165
+ device_type_not_supported = -201 ,
166
+ share_mode_not_supported = -202 ,
167
+ no_backend = -203 ,
168
+ no_device = -204 ,
169
+ api_not_found = -205 ,
170
+ invalid_device_config = -206 ,
171
+ loop = -207 ,
172
+ backend_not_enabled = -208 ,
173
+
174
+ device_not_initialized = -300 ,
175
+ device_already_initialized = -301 ,
176
+ device_not_started = -302 ,
177
+ device_not_stopped = -303 ,
178
+
179
+ failed_to_init_backend = -400 ,
180
+ failed_to_open_backend_device = -401 ,
181
+ failed_to_start_backend_device = -402 ,
182
+ failed_to_stop_backend_device = -403 ,
177
183
};
178
184
179
185
pub fn maybeError (result : Result ) Error ! void {
@@ -232,6 +238,8 @@ pub fn maybeError(result: Result) Error!void {
232
238
.cancelled = > error .Cancelled ,
233
239
.memory_already_mapped = > error .MemoryAlreadyMapped ,
234
240
241
+ .crc_not_match = > error .CrcNotMatch ,
242
+
235
243
.format_not_supported = > error .FormatNotSupported ,
236
244
.device_type_not_supported = > error .DeviceTypeNotSupported ,
237
245
.share_mode_not_supported = > error .ShareModeNotSupported ,
@@ -240,6 +248,7 @@ pub fn maybeError(result: Result) Error!void {
240
248
.api_not_found = > error .ApiNotFound ,
241
249
.invalid_device_config = > error .InvalidDeviceConfig ,
242
250
.loop = > error .Loop ,
251
+ .backend_not_enabled = > error .BackendNotEnabled ,
243
252
244
253
.device_not_initialized = > error .DeviceNotInitialized ,
245
254
.device_already_initialized = > error .DeviceAlreadyInitialized ,
0 commit comments