Constructors
That’s it. Every other way you make an instance of a type is just calling atotally vanilla function that does some stuff and eventually bottoms out to TheOne True Constructor.
Move constructors are meaningless in Rust because we don’t enable types to“care” about their location in memory. Every type must be ready for it to beblindly memcopied to somewhere else in memory. This means pure on-the-stack-but-still-movable intrusive linked lists are simply not happening in Rust (safely).
While Rust provides a trait for specifying the moral equivalent of adefault constructor, it’s incredibly rare for this trait to be used. This isbecause variables aren’t implicitly initialized. Default is basicallyonly useful for generic programming. In concrete contexts, a type will provide astatic new
method for any kind of “default” constructor. This has no relationto in other languages and has no special meaning. It’s just a namingconvention.