Hacker News new | past | comments | ask | show | jobs | submit login

`?` will convert the original error to the one the caller returns so you can implement the decoration in the conversion if that's suitable, otherwise `Result#map_err` lets you convert an error "at the callsite" (and is a noop if there was no error). Alternatively, you can use error_chain: https://brson.github.io/error-chain/error_chain/index.html.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: