-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Error
impl for throw MyError
fn
#298
Comments
Error
impl for throw Error
fnError
impl for throw MyError
fn
Thanks for opening this issue. Support for Support for the |
@chinedufn Thanks! Impl for |
Anytime. #150 would solve your problem., or are you suggesting otherwise? |
Partially. Could be great to have something like |
Looks like good enough, as I hope. Thanks! 😊 |
The type returned by a function as second part of the
Result
must implement theError
protocol. For example:Error:
Thrown expression type 'RustString' does not conform to 'Error'
Produced Swift:
Workaround is to add impl by hand:
But this is not refactorible and could be great to have one of following options:
extension {Ty}: Error {}
automaticallyextension {Ty}: Error {}
by rust attribute like#[swift_bridge(impl(Error))] type MyErr;
First and second are the best, imho.
The text was updated successfully, but these errors were encountered: