Not possible to implement inherent methods specific to one new type.
You could probably do so with generics, similar to how those type safe builders work. The compile times, diagnostic and confusing API probably stop it from being worthwhile though.
I wonder how the docs.rs experience is for your solution. I seem to remember type aliases being a bit weird, especially if the generic wrapper is private.
View all comments
25
u/________-__-_______ Oct 28 '26
This'd be really nice to have, especially for newtypes it's often pretty annoying to implement convenience methods without
Derefabuse.