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

Deprecate non-ComResult Results #148

Open
Rantanen opened this issue Nov 7, 2019 · 0 comments
Open

Deprecate non-ComResult Results #148

Rantanen opened this issue Nov 7, 2019 · 0 comments

Comments

@Rantanen
Copy link
Owner

Rantanen commented Nov 7, 2019

I don't think there's much point in supporting custom results. One intended benefit for this was to support things like returning io::Result directly - but having the user do into() on that isn't asking too much more in the end.

Also given Microsoft is developing com-rs, I'm fine giving up on the "Intercom needs to be able to call any COM API" requirement and instead aim for "Most COM APIs but with the best ergonomics possible" and I feel requiring ComResult for fallible methods will give more benefits:

  • We can remove #[infallible] and instead assume that any method that doesn't return ComResult should be considered #[infallible].
  • We might be able to target stable Rust. The error traits are one of the only ones that require specialization currently.
  • With stricter types, it should be easier to figure APIs for supporting custom error info when serializing into ComError.
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

No branches or pull requests

1 participant