Treating Smart Pointers Like Regular References with the Deref Trait Following the Pointer to the Value Using Box Like a Reference Defining Our Own Smart Pointer Treating a...
Data Representation in Rust Data Representation in Rust Low-level programming cares a lot about data layout. It’s a big deal. It alsopervasively influences the rest of the lang...
Attributes Conditional compilation Linking to native libraries Inlining code Attributes C++ has various ways to give compiler directives during compilation: Compile flags ...
Poor Lifetime Enforcement How Rust helps Poor Lifetime Enforcement A function like is completely legal and dangerous: std :: string & getValue () { std :: string val...
Optimizations & Best Practices neq_assign Using smart pointers effectively View functions Pure Components Functional components (a.k.a hooks) Keyed DOM nodes when they arrive ...
Fearless Concurrency Fearless Concurrency Handling concurrent programming safely and efficiently is another of Rust’s major goals. Concurrent programming, where different parts...
References References There are two kinds of reference: Shared reference: & Mutable reference: &mut Which obey the following rules: A reference cannot outlive its refere...
Extensible Concurrency with the Sync and Send Traits Allowing Transference of Ownership Between Threads with Send Allowing Access from Multiple Threads with Sync Implementing...
Working with Environment Variables Writing a Failing Test for the Case-Insensitive search Function Implementing the search_case_insensitive Function Working with Environmen...