Environment Variables in Rust - Full Crash Rust Tutorial for Beginners

Опубликовано: 28 Сентябрь 2024
на канале: Francesco Ciulla
473
21

The Rust series is available here:
   • Rust Installation, Hello World, Hello...  

Useful links
Rust book: https://mybook.to/YJI6DI
Rust Workbook: https://francescociulla.gumroad.com/l...
Rust Cheatsheet: https://francescociulla.gumroad.com/l...
Find me: https://francescociulla.com

Explore how to work with environment variables in Rust. We'll cover using the standard library's env module, reading variables from the command line, and loading them from a .env file. The video also includes a recap on error handling with unwrap, expect, and match.

https://github.com/FrancescoXX/enviro...

#rustprogramming #rustlang #programmingtutorial

0:00 Intro
1:13 Example1 - Environment variables in Rust using the standard library and env module
3:07 Example 2 - Read environment variables from the command line (Windows or Linux)
5:42 Example 3 - Environment variables from a file .env
8:24 Error handling recap with unwrap, expect, match
13:25 Conclusion