In this article, I will review some common data types defined in Rust standard libraries.
Box: A Smarter Pointer
Box<T>
is used to point data on the heap (instead of the stack). It’s very similar to the smart pointer in C++. When a Box is out of the scope, the destructor function will be invoked, internal objects will be destroyed and the memory on heap will…