MENU

Fun & Interesting

Rust Functions and Modules 🦀

Trevor Sullivan 12,630 2 years ago
Video Not Working? Fix It Now

In this video, we take a look at defining Rust functions with input parameters and output values. We also will explore how to organize Rust code into modules and child modules. Each member of a Rust module has private or public visibility; by default it's private. In order for a function to be exposed from a Rust module, you will need to specify public visibility. Rust modules can be defined in separate source code files and referenced from your main (entrypoint) module. Although the Rust compiler (rustc) can only accept a single source code file as input, any referenced module files will be included during the compilation step. 🤯 Rust Programming Playlist 🦀 https://www.youtube.com/playlist?list=PLDbRgZ0OOEpUkWDGqp91ODn0dk7LPBAUL 📖 Rust Modules: https://doc.rust-lang.org/reference/items/modules.html 📖 Rust Functions: https://doc.rust-lang.org/reference/items/functions.html Visual Studio Code ➡️ https://code.visualstudio.com Rust Website ➡️ https://rust-lang.org Rustup Installer ➡️ https://rustup.rs Rust Docs ➡️ https://doc.rust-lang.org/book Please follow me on these other social channels! ➡️ https://trevorsullivan.net ➡️ https://github.com/pcgeek86 ➡️ https://twitter.com/pcgeek86 ➡️ https://youtube.com/trevorsullivan ➡️ https://facebook.com/trevorsoftware ➡️ https://tiktok.com/pcgeek86 All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names,trademarks and brands does not imply endorsement. #opensource #software #linux #devops #programming #rusty #rustdev #dev #coding #codinglife #code #coder #ubuntu #ubuntulinux #appdev #rustlang #rust #developer

Comment