Skip to content
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

Implement conversion of Result⟶exception #73

Merged
merged 4 commits into from
Mar 17, 2020
Merged

Implement conversion of Result⟶exception #73

merged 4 commits into from
Mar 17, 2020

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Mar 17, 2020

This allows an extern "Rust" function to be declared with a Result<T> return type. The implementation is allowed to return any error type that implements Display. We'll to_string the error and throw an exception of type rust::Error on the C++ side.

The reverse direction of exception⟶Result will be implemented in a separate PR.

#53

@dtolnay dtolnay merged commit 8c1a558 into master Mar 17, 2020
@dtolnay dtolnay deleted the result branch March 17, 2020 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant