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 has been archived by the owner on Jun 3, 2021. It is now read-only.
This Is the traditional way to do pseudo-inheritance in Rust, through composition. However, it means that all the relevant methods have to be re-written since the field is not public. As an alternative, @Nemo157 suggested instead that the struct be wrapped by the error handler, the same way Locatable works:
Currently, the
error_handler
is always a field of whatever struct it's on, like this:This Is the traditional way to do pseudo-inheritance in Rust, through composition. However, it means that all the relevant methods have to be re-written since the field is not public. As an alternative, @Nemo157 suggested instead that the struct be wrapped by the error handler, the same way
Locatable
works:This means the methods for the error handler no longer have to be rewritten for each new struct.
cc @pythondude325
The text was updated successfully, but these errors were encountered: