Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

理解擁有權

擁有權是 Rust 最獨特的功能,並對語言的其他部分有深遠影響。它讓 Rust 能在不需要垃圾回收器的情況下提供記憶體安全保證,因此理解擁有權如何運作非常重要。在本章中,我們會談擁有權以及幾個相關功能:借用、切片,以及 Rust 如何在記憶體中分配資料。