I want to try to have some values in a Struct which will be used as a default if the data isn't supplied. Is this possible in rust? What I really want in the example below is to use a number I supply, or a default value, or zero, etc.
Rust doesn't have default function arguments. If your type is pure plain-old-data, then omit the constructor, add a (possibly derived) Default impl, and allow users to construct instances using FRU syntax.
Playground with fixed syntax (more idiomatic names and removed Hungarian notation).
Also note that the traditional "overloading" (ad-hoc
polymorhpism) can be emulated in Rust in a more principled manner using traits. For example, in order to overload on arity, you can implement a trait for tuples of different arity. Like this: