"Implementing Deref for smart pointers makes accessing the data behind them convenient, which is why they implement Deref. On the other hand, the rules regarding Deref and DerefMut were designed specifically to accommodate smart pointers. Because of this, Deref should only be implemented for smart pointers to avoid confusion. "
But what is the definition of a “smart pointer”? In a lot of cases it’s no clear.
Is a type-safety newtype, for the inner type? If not then, why is
Deref? Or guards likeMutexGuard`?
One way or another, I think the documentation should elaborate more on that.