-
Notifications
You must be signed in to change notification settings - Fork 967
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
feat: add response::Error #911
Conversation
This type makes for efficient use of the `?` operator when in a function with multiple return error types that all implement `IntoResponse`. Signed-off-by: Nathaniel McCallum <nathaniel@profian.com>
I like the idea, but why are there so many separate |
@jplatte It conflicts with the blanket |
Ah, that's unfortunate. I wonder whether there's a way around it 🤔 |
Perhaps we could have |
I think this is an interesting idea as well! Can you give some examples of how you imagine people would use it? Both for error types that you own (and can implement Specifically it needs to beat |
@davidpdrsn We have, for example, different traits for different kinds of backends doing different functions. Each of them have their own error types, all of which Therefore, we need one common |
So do you then implement |
@davidpdrsn No. The goal is that each distinct |
I have added a separate PR for a simpler approach. I'll leave this here so we can compare approaches. |
I think we should go with #921 instead as its simpler and more flexible. I'll close this for now. |
This type makes for efficient use of the
?
operator when in a functionwith multiple return error types that all implement
IntoResponse
.Signed-off-by: Nathaniel McCallum nathaniel@profian.com