Y
Hacker News
new
|
ask
|
show
|
jobs
by
Timshel
570 days ago
In general such a thing is written with a wrapper type which disappear at compilation (a kind of stricter type alias).
In rust might be a NewType:
https://www.howtocodeit.com/articles/ultimate-guide-rust-new...