-
-
Notifications
You must be signed in to change notification settings - Fork 123
Add CastNone trait #843
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
Add CastNone trait #843
Conversation
Closes gtk-rs#842
Co-authored-by: Bilal Elmoussaoui <belmouss@redhat.com>
I don't like the API but if people think this is useful to have let's merge it. @bilelmoussaoui @GuillaumeGomez? |
I think the use case for this API would be mostly GTK and libraries building on top of it as mentioned on the Matrix channel. I would suggest adding a warning to not go through this API unless downcasting/upcasting to the wrong type is a programmer error and the fallback shouldn't handled in that case. |
* Add CastNone trait Closes #842 * Add CastNone to prelude, add dynamic_cast * Add example for CastNone * Describe type using turbofish op
Closes #842