constructors

This commit is contained in:
2020-05-10 16:07:27 +02:00
parent d6f2d44eaf
commit b9c03f8207
15 changed files with 257 additions and 1 deletions

14
rust/Constructors.md Normal file
View File

@ -0,0 +1,14 @@
# 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.
- [main.rs](./classes/src/main.rs)
- [car.rs](./classes/src/car.rs)