Hacker News new | ask | show | jobs
by zozbot234 2216 days ago
> but it's a fair amount of boilerplate or macros to make the newtype useful.

As mentioned in the docs, you can use the Deref facility to have the newtype implement everything that the original type does. Rust just gives you the choice of doing this vs. wrapping with a custom set of impls.

1 comments

I'm not sure why I didn't recall that :-P Of course you are correct!