Skip to content

iNoles/vehicle-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vehicle Management System

This Rust project demonstrates a singleton pattern for managing vehicles.

Singleton Pattern

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.

Getting Started

Prerequisites

  • Rust (stable)
  • Cargo (Rust's package manager)

Installation

  1. Clone the repository:

    git clone https://github.com/iNoles/vehicle-rust.git
  2. Navigate to the project directory:

    cd vehicle-rust
  3. Build the project using Cargo:

    cargo build

Usage

The main.rs file demonstrates how to use the VehicleManager singleton to add vehicles and print the total number of vehicles.

Contributing

Feel free to contribute by opening issues or pull requests. Follow the coding standards specified in the project.