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
{{ message }}
This repository was archived by the owner on Aug 16, 2021. It is now read-only.
And everything is fine but of course I can't implement a trait for the external failure::Error :(
How would you solve this? Keep using the wrapper AppError that holds all possible error types?
Or use a struct WrappedError(failure::Error) and impl the std::error::Error manually?
I trying to migrate from
quick_errortofailurewith the following code.This was the original error enum:
that is used within a rocket module:
And here I was able to impl a trait for my custom
AppError:With
failureI don't need the wrappingAppErroranymore (👍) so now theResultlooks like this:And everything is fine but of course I can't implement a trait for the external
failure::Error:(How would you solve this? Keep using the wrapper
AppErrorthat holds all possible error types?Or use a
struct WrappedError(failure::Error)and impl thestd::error::Errormanually?