We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
try_deref
NullableTrait<T>
There is a deref that panic, there is a deref_or that takes a default value, but we could easily add a try_deref that would return an Option<T>.
deref
deref_or
Option<T>
Describe Alternatives
Using the TryInto trait: imp TryNullableTIntoT<T> of TryInto<Nullable<T>, T>.
TryInto
imp TryNullableTIntoT<T> of TryInto<Nullable<T>, T>
Related code
cairo/corelib/src/nullable.cairo
Lines 19 to 31 in a93f3df
If the feature request is approved, would you be willing to submit a PR? (Help can be provided if you need assistance submitting a PR)
No, it can be an easy task for a new contributor
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Feature Request
There is a
deref
that panic, there is aderef_or
that takes a default value, but we could easily add atry_deref
that would return anOption<T>
.Describe Alternatives
Using the
TryInto
trait:imp TryNullableTIntoT<T> of TryInto<Nullable<T>, T>
.Related code
cairo/corelib/src/nullable.cairo
Lines 19 to 31 in a93f3df
If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)
No, it can be an easy task for a new contributor
The text was updated successfully, but these errors were encountered: