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
Map result of build function #162
Comments
This feels like it's related to #60; rather than encouraging people to parse the string error, we should have the crate expose a way to produce a more structured error and allow people to map over that. |
@TedDriggs Looks good 👍 |
Fixed in #194 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I quite frequently find myself writing code like this
It would be nice if I could specify this as an attribute (so I do not have to map the result myself)
Closures accept both
Error::custom
(path to a function) and|e| Error::custom(e)
, which would mean one could simply doThe function would have to have the signature of
which could be verified with an assertion in the output like this
Allowing this has several benefits:
Result
(not a mixture ofError
andString
).String
(a proc-macro should be able to produce&'static str
?)no_std
, without depending onalloc
?The text was updated successfully, but these errors were encountered: