Enum

A hands-on journey into Rust Enums - Discover how to craft custom data types using enum variants (basic, tuple, struct) and leverage `derive` for easy printing and comparison. Unpack the standard library's `Option<T>` for managing absence and `Result<T, E>` for clear success/error handling.


1. Scalar Type
A clear primer on Understanding Rust's Scalar Data Types - Explore Rust's fundamental scalar types: integers (signed/unsigned, arch-dependent), floating-point numbers, booleans, and Unicode characters. Understand explicit type conversion with `as` and how to query `MIN`/`MAX` constants for value boundaries. Duration: 4min
2. Scalar Type Exercises
An essential look at Scalar types - Discover Rust's core data components: integers, floats, booleans, and characters, the foundational units of information. Apply your knowledge through hands-on exercises in comparing `char`s, summing `f32` values, and performing numeric type casting. Reading Time: 0min
3. Overflow
A detailed guide to Handling Integer Overflows in Rust - Uncover Rust's default integer overflow handling: panicking in debug for safety and wrapping in release for performance. Explore explicit methods such as `checked_add` and `wrapping_add` for robust, mode-independent arithmetic. Duration: 4min
4. Tuple
A detailed exploration to Understanding Tuples in Rust - Uncover creating, accessing, and destructuring Rust's fixed-size, mixed-type collections, including the unit type and nested tuples. Learn how functions use tuples to return multiple values and how destructuring provides convenient access to their elements. Duration: 6min
5. Tuple Exercises
An elemental exploration of Rust Tuples - Discover Rust's way of grouping multiple values of potentially different types into one compound type. You'll get hands-on experience accessing specific elements and swapping their order within a tuple. Reading Time: 0min
6. Array
An essential comparison of Rust Arrays vs. Slices - Discover why arrays have fixed, compile-time lengths while slices offer flexible, runtime views into data. Explore array definition, initialization, and element manipulation, plus techniques for creating powerful slices. Duration: 3min
7. Array Exercises
An elemental guide to Array - Delve into Rust's fixed-size arrays, understanding their creation and how to access specific portions. Practice initializing an array with zeros and master techniques for slicing out the first or last few elements. Reading Time: 0min
8. String And Str
An essential guide to Mastering Strings in Rust: `String` vs. `&str` - Understand Rust's core string types: the owned, heap-allocated `String` for mutable text, and `&str`, an immutable reference to string data. Learn to create, manipulate (slice, append, format), convert between them, and apply best practices for choosing the right type. Duration: 7min
9. String And Str Exercises
An essential primer on `String` and `&str` - Explore Rust's core text types, understanding the distinction between owned `String`s and borrowed `&str` slices. You'll practice these concepts by creating, concatenating, and appending strings in hands-on exercises. Reading Time: 0min
10. Enum
A hands-on journey into Rust Enums - Discover how to craft custom data types using enum variants (basic, tuple, struct) and leverage `derive` for easy printing and comparison. Unpack the standard library's `Option<T>` for managing absence and `Result<T, E>` for clear success/error handling. Duration: 6min
11. Enum Exercises
A practical introduction to Rust Enums - Define your own custom types by creating a `Color` enum with variants such as `Red`, `Green`, and `Blue`. Learn to include variants that hold data, like `Rgba(u8, u8, u8, f32)`, and make your enums public for broader use. Reading Time: 0min
12. Struct
A foundational guide to Understanding Structs in Rust - Define custom data types using named-field, tuple, unit-like, and nested structs, essential building blocks in Rust. Master instance creation, modification, `Debug` printing, and concise shorthands for initialization and updates. Duration: 7min
13. Struct Exercises
A foundational introduction to Structs - Learn to define custom data types in Rust by creating an `Account` `struct` with public `address` (`String`) and `balance` (`u32`) fields. You'll also implement an associated `new` function to initialize `Account` instances with a given address and a default balance of zero. Reading Time: 0min
14. Vector
A dynamic introduction to Rust Vectors - Learn to create, populate, and manage dynamically-sized collections using `Vec::new()`, `vec!`, and `push()`. Explore safe element access with `get()` versus indexing, updating, removing with `pop()`, and creating vector slices. Duration: 6min
15. Vector Exercises
A foundational introduction to Rust Vectors - Learn the basics of Rust's dynamic array type, the `Vec<T>`, and how to create instances. You'll practice by implementing a function to initialize a vector with given elements. Reading Time: 0min
16. Hash Map
A versatile introduction to Rust's `HashMap` - Learn to create and manage key-value pairs, from initialization and data insertion to value retrieval. Discover efficient update techniques, including the `entry().or_insert()` method for adding or modifying map entries. Duration: 4min
17. Hash Map Exercises
A hands-on guide to initializing Rust HashMaps - Discover how to create and populate a `HashMap`, a fundamental Rust collection for key-value storage. You'll practice by implementing a function to initialize a new `HashMap` and insert a specific address-amount pair. Reading Time: 0min

Course Overview

About the course

What you'll learn

Introduction to the Rust programming language

Rust variables and functions

Scalar types, arrays, strings, enum, structs, vectors, and hash maps in Rust

Rust control flows: If / else, if let and let else, loop, match

Rust ownership, including borrow and references

Rust error handling

Rust Modules

Rust Traits

Course Description

Who is this course for?

  • Smart Contract Developers
  • Blockchain Engineers
  • Web3 Developers
  • Smart Contract Security Researchers
  • Solutions Architects

Meet your instructors

Tasuku Nakamura

Tasuku Nakamura

Founder at smartcontract.engineer

Smart contract engineer and educator.

Last updated on July 11, 2025