Hi,
But * only applies to reference or raw pointers right? Since some documents said rust only has two types of pointers, reference and raw pointers.
ptr: &T
ptr: Box ===>>> NOT Pointer in compiler’s view
ptr: Rc ===>>> NOT Pointer in compiler’s view
ptr: Arc ===>>> NOT Pointer in compiler’s view
ptr: *const T
I think *box.deref() is better in a sense that it makes very clear where the pointer comes from. Saving a few keystrokes but add quite complexity to make code not that readable and make the concept harder to understand. the trait name deref is also misleading since it actually gives a reference back…