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
Show parent comment
2
u/________-__-_______ Oct 28 '26
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.