50 Topics
Getting started with Rust Introduction Topic
Traits All Versions
Traits are a way of describing a 'contract' that a struct must implement. Traits typically define method signatures but can also provide implementations based on other methods of the trait, providing the trait bounds allow for this. For those familiar with object...
Loops All Versions
Serde Stable1.15.0–1.16.0
Serde is a popular serialization and deserialization framework for Rust, used to convert serialized data (e.g. JSON and XML) to Rust structures and vice versa. Serde supports many formats, including: JSON, YAML, TOML, BSON, Pickle and XML.
Strings All Versions
Unlike many other languages, Rust has two main string types: String (a heap-allocated string type) and &str (a borrowed string, which does not use extra memory). Knowing the difference and when to use each is vital to understand how Rust works.
Parallelism All Versions
Parallelism is supported well by Rust's standard library through various classes such as the std::thread module, channels and atomics. This section will guide you through the usage of these types.
Rust Style Guide All Versions
Although there is no official Rust style guide, the following examples show the conventions adopted by most Rust projects. Following these conventions will align your project's style with that of the standard library, making it easier for people to see the logic in...
Cargo All Versions
Cargo is Rust's package manager, used to manage crates (Rust's term for libraries/packages). Cargo predominantly fetches packages from crates.io and can manage complex dependency trees with specific version requirements (using semantic versioning). Cargo can also...
Lifetimes All Versions
Macros All Versions
Modules All Versions
Auto-dereferencing All Versions
Pattern Matching All Versions
File I/O All Versions
Option All Versions
The Option type is Rust's equivalent of nullable types, without all the issues that come with it. The majority of C-like languages allow any variable to be null if there is no data present, but the Option type is inspired by functional languages which favour...
Iterators All Versions
Iterators are a powerful language feature in Rust, described by the Iterator trait. Iterators allow you to perform many operations on collection-like types, e.g. Vec, and they are easily composable.
Structures All Versions
Globals All Versions
Tuples All Versions
The most trivial data-structure, after a singular value, is the tuple.
Bare Metal Rust All Versions
The Rust Standard Library (std) is compiled against only a handful of architectures. So, to compile to other architectures (that LLVM supports), Rust programs could opt not to use the entire std, and instead use just the portable subset of it, known as The Core...