Closed AArnott closed 4 months ago
When I change the UDL to this:
[Enum]
interface LightWalletError {
InvalidUri();
InvalidHandle();
Other(string message);
};
The error in the generated rust code goes away. But then uniffi-bindgen-cs generates invalid C#. It appears the error type above cannot be attributed as both an error and an enum, and uniffi-bindgen-cs cannot handle an enum interface like above being used as an error type.
The problem is your Other { message: String },
- this kind of "flat" error must have plain variants. [Error] interface LightWalletError {
should work.
Yup, that worked. Thanks!
I added my first callback interface to my udl file, and now uniffi-rs generates code that won't compile.
Here is the UDL I added:
LightWalletError
by the way is defined like this:In rust, my error type is defined as:
The full error is:
The generated code around which the error was found is:
Am I doing something wrong?