Hacker News new | ask | show | jobs
by domenukk 1866 days ago
To be fair, a trait gets you 98% there. It can have default implementations for most functions, you just overwrite the ones you want to change. You'll still need to declare the underlying struct though, so a bit of extra code