-
Notifications
You must be signed in to change notification settings - Fork 58
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
HList try_pluck
#197
Comments
Hmmmm. Yes I can see why this would raise conflicting impls. The thing that makes For Specialization in rust has had such a tumultuous history that I'm always wary of suggestions that it may help a particular problem. If it does work for this, then it would have to take the place of our index types, since those currently would disambiguate the impls and cause them to not specialize each other. |
I agree with @ExpHP 's assessment; this will be pretty difficult to implement with |
I had a go at writing a
try_pluck
method on HList. It would returnSome
if the type is in the list, orNone
if it isn't. But I wasn't able to make it work due to rustc complaining about conflicting impls. My gut tells me this would need specialization on nightly, but I could be wrong about that. Do you have any thoughts/ideas?The text was updated successfully, but these errors were encountered: