Rust Programming Language
Getting started
Hello world fn main() { println!("Hello, world!"); } The main function is always the first f...
Variables, types, mutatbility, functions, and control flow
Variables By default variables are immutable in Rust. Once you assign a value to it you cannot c...
References and Borrowing
Ownership Rust has it's own way of managing memories that are allocated on the heap. Unlike C, w...
Slice Type
Slice type Slices in Rust let you reference a contiguous sequence of elements in a collection ra...
Using Structs to Structure Related Data
Defining and instantiating structs Struct allows you to compose different type of data together ...
Enum and Pattern Matching
Defining an Enum Enum or enumeration gives you a way of defining a set of possible values for on...
Packages, Crates, and Modules
Crate The smallest unit that the Rust compiler will work with. When you run rustc some_file.rs t...
Common Collections
Vector Allows you to store variable number of values next to each other To create an empty vect...