更新时间:2021-07-02 14:12:31
coverpage
Title Page
Copyright and Credits
Hands-On Data Structures and Algorithms with Rust
About Packt
Why subscribe?
Packt.com
Foreword
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the color images
Download the example code files
Conventions used
Get in touch
Reviews
Hello Rust!
Rust in 2018
The 2018 edition
The Rust language
Objects and behavior
Going wrong
Macros
Unsafe
Borrowing and ownership
Exceptional lifetimes
Multiple owners
Concurrency and mutability
Immutable variables
Shadowing
Interior mutability
Moving data
Sharing data
Send and Sync
Deeper into Rust
Requests for Comments (RFCs)
Summary
Questions
Further reading
Cargo and Crates
Cargo
Project configuration
The manifest – Cargo.toml
Package
Profiles
Dependencies
Dependencies – Cargo.lock
Commands
The compile and run commands
Testing
Third-party subcommands
Crates
Rust libraries and binaries
Static and dynamic libraries
Linking and interoperability
FFI
Wasm
The main repository – crates.io
Publishing
Storing Efficiently
Heaps and stacks
Sized and unsized
Generics
Accessing the box
Copying and cloning
Immutable storage
States and reasoning
Concurrency and performance
Lists Lists and More Lists
Linked lists
A transaction log
Adding entries
Log replay
After use
Wrap up
Upsides
Downsides
Doubly linked list
A better transaction log
Examining the log
Reverse
Skip lists
The best transaction log
The list
Adding data
Leveling up