Blog Post: Lifetime Parameters in Rust

I was thinking of Box as just another reference that can have shared or exclusive ownership. My concept was that 'borrowed' means all the references are sharing. I realize my conceptualization was incorrect, because the stack based borrowing always has to unwind to only the instance that created the Box reacquiring exclusive ownership, unless of course it had moved that ownership.

But I still don't understand the distinction between a Box and a reference & in the context of ownership. Seems I can move ownership from a Box to a &? I was thinking of a Box as only the way to construct object on the heap. Is my function required to input the type of Box when it demands the ownership be moved to the function?

Rust checks two dimensions of resource lifetimes safety: allocation and mutability.

So we forsake Rust's compile-time safety when the allocation and/or mutability sharing can't be modelled by Rust's stack based borrows.

Afaics, the stack is the key word that we needed to introduce to distil to the generative essence.

Edit: or more accurately stack based and block scope based within a function. And there there is also the issue of closures and Box inside objects that out live stack frames.