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

allow Option<T> as parameter types #186

Closed
karroffel opened this issue Aug 29, 2019 · 0 comments · Fixed by #189
Closed

allow Option<T> as parameter types #186

karroffel opened this issue Aug 29, 2019 · 0 comments · Fixed by #189
Labels
feature Adds functionality to the library

Comments

@karroffel
Copy link
Member

When a Rust method is exported to Godot, the type information of the parameters is used to convert the incoming Variants from Godot into the correct data type.

We could allow a new type, Option<T>, to be used as a parameter type as well. When trying to construct the value upon a method call it can be checked if the Variant is NULL or not, and construct the Option<T> accordingly.

@karroffel karroffel added the feature Adds functionality to the library label Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adds functionality to the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant