You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have a good name for this but a lot of enums have methods for each variant that return an Option<...> for that variant's data. Both Result and Option in the standard library do that for example. Could easily be derivable. Also there's fn is_<variant>(&self) -> bool for all of these variants too.
The text was updated successfully, but these errors were encountered:
I don't have a good name for this but a lot of enums have methods for each variant that return an
Option<...>
for that variant's data. BothResult
andOption
in the standard library do that for example. Could easily be derivable. Also there'sfn is_<variant>(&self) -> bool
for all of these variants too.The text was updated successfully, but these errors were encountered: