{"@context":"https://ihatereading.in/roadmap/schema/v1","type":"roadmap-chapter","roadmap":{"slug":"rust-development","title":"Rust Developer Roadmap","url":"https://ihatereading.in/roadmap/rust-development","machineUrl":"https://ihatereading.in/roadmap/rust-development.json"},"slug":"ownership-and-borrowing","title":"Ownership, Borrowing & Lifetimes","url":"https://ihatereading.in/roadmap/rust-development/ownership-and-borrowing","machineUrl":"https://ihatereading.in/roadmap/rust-development/ownership-and-borrowing.json","summary":{"purpose":"Rust's core contract: one owner, many borrowers, lifetimes when the compiler needs help.","prerequisites":["Syntax and types"],"afterThisChapter":["Traits, Generics & Error Handling","Async Rust"]},"agentLens":null,"topics":[{"id":"ownership","slug":"ownership","title":"Ownership","level":"beginner","category":null,"importance":"essential","difficulty":"beginner","learn":["Move semantics","Copy types","Drop order"],"why":["Eliminates whole classes of use-after-free without a GC."],"prerequisites":[],"nextTopics":["borrowing","lifetimes"],"relatedTopics":[],"usedIn":[],"understand":{"summary":"Each value has exactly one owner; when the owner goes out of scope, the value is dropped.","example":null,"mentalModel":"Library book checkout — one holder at a time unless you explicitly borrow.","howItWorks":null,"underTheHood":null,"misconceptions":[]},"questions":{"learning":["What happens when you assign a non-Copy value to another variable?"],"practice":[],"interview":["Explain ownership in Rust without jargon overload."],"advanced":[],"debugging":[],"comparison":[]},"projects":{"beginner":"CLI that reads a file into a `String` and passes ownership into a parser function.","intermediate":null,"advanced":null},"commonMistakes":[],"bestPractices":[],"debug":null,"compare":[],"resources":{"official":[],"tutorials":[],"videos":[],"websites":[],"youtube":[],"ihateReading":[]},"agentLens":null,"skipIf":null,"build":null,"next":["borrowing","lifetimes"],"prerequisite":[]},{"id":"borrowing","slug":"borrowing","title":"Borrowing & references","level":"intermediate","category":null,"importance":null,"difficulty":"intermediate","learn":["`&T` vs `&mut T`","Borrow checker errors","Slices"],"why":["Most Rust code is references, not clones."],"prerequisites":["ownership"],"nextTopics":["lifetimes","smart-pointers"],"relatedTopics":[],"usedIn":[],"understand":null,"questions":{"learning":[],"practice":[],"interview":[],"advanced":[],"debugging":["Why does the compiler reject two mutable borrows at once?"],"comparison":["`String` vs `&str` — owned buffer vs borrowed view.","Box vs Rc vs Arc — single owner vs shared ownership (preview)."]},"projects":null,"commonMistakes":[],"bestPractices":[],"debug":{"mistakes":[],"errors":["borrow of moved value — trace where ownership was transferred."],"scenarios":[]},"compare":["String vs &str — when to take owned vs borrowed parameters?","Clone vs borrow — when is cloning the right tradeoff?"],"resources":{"official":[],"tutorials":[],"videos":[],"websites":[],"youtube":[],"ihateReading":[]},"agentLens":null,"skipIf":null,"build":null,"next":["lifetimes","smart-pointers"],"prerequisite":["ownership"]},{"id":"lifetimes","slug":"lifetimes","title":"Lifetimes (when needed)","level":"advanced","category":null,"importance":null,"difficulty":"advanced","learn":["Lifetime annotations","Struct references","Elision rules intro"],"why":[],"prerequisites":["borrowing"],"nextTopics":["traits-generics-and-errors"],"relatedTopics":[],"usedIn":[],"understand":null,"questions":{"learning":["Why do some function signatures need `'a`?"],"practice":[],"interview":[],"advanced":["When can elision hide lifetime parameters safely?"],"debugging":[],"comparison":[]},"projects":null,"commonMistakes":[],"bestPractices":[],"debug":null,"compare":[],"resources":{"official":[],"tutorials":[],"videos":[],"websites":[],"youtube":[],"ihateReading":[]},"agentLens":null,"skipIf":null,"build":null,"next":["traits-generics-and-errors"],"prerequisite":["borrowing"]}],"updatedAt":"2026-10-23T06:00:45.511Z"}