ownership

Ownership transfer prevents double-free and use-after-free

Rust's ownership system guarantees memory safety without garbage collection. Each value has exactly one owner, and when ownership is transferred (moved), the previous owner can't use it anymore. This prevents double-frees and use-after-free bugs at co

Borrowing with & and &mut for zero-cost access

Instead of transferring ownership, Rust lets you borrow values with references (&T for immutable, &mut T for mutable). Borrows allow functions to read or modify data without taking ownership, so the caller retains access afterward. The borrow