3 ms·
> you could define the equivalent of Go error in Rust as a trait and box it (ie. a trait object). I know this basically how Go's error handling works (Put erro
by rqs 8y ago
> you could define the equivalent of Go error in Rust as a trait and box it (ie. a trait object).
I know this basically how Go's error handling works (Put error data on heap and pass the reference), but I'm not fan of it (the put data on heap part of it) too :(
I will try out the error-chain, thank you for reminding me that.
- steveklabnik 8y agoThe “failure” crate is an alternative to error-chain as well.