497 B
497 B
Constructors in rust
Rust is a special case for constructors. The language itself is already different from most other languages in structure, especially for object oriented programming.
Simply said, there are no constructors in rust. When you create an object, you have to initialize all data immediately and by yourself.
You can look into the classes or instances examples to see how object construction is done in rust.