Defining a module in Rust

All the applications must be modularized so that they become easy to maintain and develop. In Rust, we can have a powerful module system for our application that could hierarchically split the application source code into logical units, which we call modules, and manage their visibility (public/private) across the application.

The dictionary description of a module is that it's a collection of items, such as functions, structs, traits, impl blocks, and even other modules.

You will learn how to create a sample module and understand the concept of visibility in this recipe.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.247.181