A newtype is a struct with a single field, struct Metres(f64);, that gives an existing type a new name and a new set of operations: those implemented for it, and no others.
Computer Science · المسرد
Computer Science · المسرد
A newtype is a struct with a single field, struct Metres(f64);, that gives an existing type a new name and a new set of operations: those implemented for it, and no others.