Tour of Rust Table of Contents

Raw Pointers

References can be converted into a more primitive type called a raw pointer. Much like a number, it can be copied and moved around with little restriction. Rust makes no assurances of the validity of the memory location it points to.

Two kinds of raw pointers exist:

Raw pointers can be converted to and from numbers (e.g. usize).

Raw pointers can access data with unsafe code (more on this later).

Memory Details: