Notes on Rust’s memory safety model, covering ownership, borrowing, and concurrency primitives.
Topics
- Ownership & Borrowing — borrowing rules, non-lexical lifetimes, shared and exclusive references, interior mutability
- Smart Pointers —
Box,Arc, and theDroptrait - Concurrency —
Mutex,RwLock, atomics, spinlocks,Send/Synctraits, and synchronization/concurrency primitives - Memory Model — stack vs. heap, segfaults, iterator invalidation
- Practical Patterns — connection pooling, PostgreSQL connections