CoRecursive: Coding Stories cover image

Tech Talk: Moves and Borrowing In Rust With Jim Blandy

CoRecursive: Coding Stories

00:00

The Third Kind of Access

Third vars are a way to leave the owner of a value undisturbed. You get to temporarily grant access to that value, borrowing a reference to it. References are constrained to live within a certain lifetime. They can't outlast the things that they point to. And so when you refer to an element in the middle of a vector, write,. The subscripting operator returns a reference to that element. Rit it borrows a reference tothat element. Ah, but a borrowedbut references are constrained to living within a certainlifetime. That's how rust makes sure the reference sare always there and pointing to something still there.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app