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.