Rust Person is a simple command-line application written in Rust. It prompts the user for their first name, last name, and age, creates a Person with this information, writes the Person to a text file, reads a Person from the text file, and displays the read Person.
To set up this application on your local machine, follow these steps:
- Ensure you have Rust installed. If not, you can download it from the official website.
- Clone the repository to your local machine.
- Navigate to the project directory.
- Build the project with cargo build.
- Run the project with cargo run.
The application is run from the command line. It will prompt you for your first name, last name, and age. It will then write this information to a text file and read it back.
The application's functionality is contained in a single Rust file, main.rs. This file defines a Person struct, methods for creating and displaying a Person, functions for reading user input and numbers, and functions for reading from and writing to a text file.