3 ms·
Rust doesn't have the concept of a constructor build into the language, although often you'll see a type have a "new" method, to create an instance of it. I thi
by FreeFull 12y ago
Rust doesn't have the concept of a constructor build into the language, although often you'll see a type have a "new" method, to create an instance of it. I think exceptions interact badly with destructors too, though, and Rust does have those.