May 2019
Intermediate to advanced
698 pages
17h 21m
English
In regard to types and their size in memory, the mem module from the standard library provides us with convenient APIs to inspect sizes and alignment of types and functionalities for initializing raw memory. Quite a few of these functions are unsafe and must only be used when the programmer knows what they are doing. We'll restrict our exploration to these APIs:
Being generic, these methods are meant to be called using the turbofish ::<> operator. We are not actually giving these methods a type as a parameter; we're just explicitly calling them against a type. If we were skeptical about the ...
Read now
Unlock full access