-
Notifications
You must be signed in to change notification settings - Fork 206
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
External callback interfaces/traits feature request #2007
Comments
It would be nice if you could just a tiny bit expand on what your request is. |
Callback interfaces are less likely to get love moving forward. I was going to suggest you use an external "trait" instead, but noticed that too appears to not be supported :( I'll rename this to handle both cases because the work for both will be very similar. |
@mhammond can you say a little more about this? I'd have a few functions that accept simple callbacks in my api. I'm trying to figure out the best option for supporting these. The functions are mostly for convenience. I'm wondering why was the callback interface deprecated? They are mentioned as "(soft) deprecated" in the docs (but not in the pro macro docs). Soft deprecated implies that I may be able to use and maybe wait for whatever future thing might be in the works to replace them. Are there plans to support callbacks in the future? Why were external traits deprecated? I don't see this mentioned in the docs. Sorry for all the questions. But I'm hoping with more info I may be able to help with a future solution. |
callbacks are kinda soft-deprecated because "foreign traits" offer all the same capabilities with a more consistent interface. In particular, callback interfaces are passed to rust as a external traits were never deprecated - they just were never supported - just like they were not for callbacks. Of those 2, I suspect external traits will get support first as it covers more use-cases (ie, both traits that are not designed to be implemented externally and those that are). |
@mhammond Thank you! I understand now. I was confusing "foreign" and "external" traits above, when I read your comment that external traits are not supported. |
External callback interfaces not supported at the moment.
Please add the support or make foreign traits usable externally.
The text was updated successfully, but these errors were encountered: