Awesome Archive of Programming Recipes on Rust Language
- Rust has a number of types named Result in its standard library
- The Result types are enumerations, often referred to as enums.
- An enumeration is a type that can have a fixed set of values,called the enum’s variants.
- The purpose of these Result types is to encode error-handling information.
- An instance of io::Result has an expect method that you can call.
- We can think of {} as little crab pincers that hold a value in place.
- You can print more than one value using curly brackets
- Rust doesn’t yet include random number functionality in its standard library.
- Rust team provides a rand crate at https://crates.io/crates/rand