The use-everything approach

This takes the following form:

use my_crate::module_name::*; 

This is often referred to as the sledgehammer approach, as it makes available all the symbols (the functions, traits, and so on that are public) within the module_name scope. There is nothing wrong with this approach, but it ends up with a larger binary (which may slow down the final application and will certainly require more memory to run the code).

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

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