Why can you call String methods on a Box<String>, or pass &String where &str is wanted? The answer is the Deref trait — the mechanism that lets smart pointers feel transparent.
Deref: act like what you point to
Implementing Deref lets *pointer return a reference to the inner value, and — more importantly — enables deref coercion: the compiler automatically converts &Box<T> to &T, &String to &str, and so on, wherever a method or function expects the inner type. That's why a Box<String> 'just works' as a String.
Deref coercion in practice
You've relied on this since the Borrowing track without naming it: passing &my_string to a &str parameter works because String derefs to str. The compiler chains deref coercions as needed, so a &Box<String> can reach a &str parameter through two steps, invisibly.
Box, Rc, and friends implement Deref, you call the inner value's methods directly through them. The smart pointer adds its capability (heap storage, ref counting) without making you constantly unwrap to use the value.Drop, the companion
You met Drop in the Ownership track — the cleanup that runs at end of scope. Smart pointers lean on it: when a Box drops, it frees its heap allocation; when an Rc drops, it decrements the count and frees only at zero. Deref and Drop together are what make a smart pointer behave like a value while managing a resource behind the scenes.