Topic | Description | Link |
---|---|---|
Iterators | Rust iterators are used to sequence through collections. They have a large collection of adapters that allow code using collections to be written in a style much like that used by functional programming. |
RustBite_Iterators std::iter::Iterator std::iter::IntoIterator |
Error Handling |
Rust error handling is based on use of the enumeration:
|
RustStory Enums RustStory Error Handling Gentle Introduction to Rust std::Result |
Rust env | Command line arguments for any Rust program are available through the std::env module. |
std::env Accepting CL args |
Ownership | Rusts ownership rules: There is only one owner for any resource. Owners deallocate their resources when they go out of scope. Ownership can be transferred with a Move or borrowed with a reference. References don't own resources, they just borrow them, and so never deallocate. Rust ownership does not support simultaneously aliasing and mutation. |
Rust Bites Safety
Rust Bites Ownership Rust Story Ownership By Example Rust Book Rust Nomicon |
Strings |
Rust std strings come in two flavors: |
std::path std::path::PathBuf std::path::Path Rust by Example |
struct | Rust structs serve the same role as classes do in C++ and C#. Struct methods are defined inside impl StructName {} blocks. |
Rust Story structs std::Stuct keyword impl |