This Rust project demonstrates a singleton pattern for managing vehicles.
The VehicleManager
struct is implemented as a singleton to manage vehicles. It ensures that only one instance of the manager exists throughout the program's execution.
- Rust (stable)
- Cargo (Rust's package manager)
-
Clone the repository:
git clone https://github.com/iNoles/vehicle-rust.git
-
Navigate to the project directory:
cd vehicle-rust
-
Build the project using Cargo:
cargo build
The main.rs file demonstrates how to use the VehicleManager singleton to add vehicles and print the total number of vehicles.
Feel free to contribute by opening issues or pull requests. Follow the coding standards specified in the project.