Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coursera

Building Idiomatic Rust with Traits and Collections

Packt via Coursera

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
This course features Coursera Coach! A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. Rust is a powerful language designed for performance and memory safety, and in this course, you’ll master building idiomatic Rust programs using collections, traits, and advanced features. Through detailed examples and hands-on projects, you’ll gain the skills to handle dynamic data with vectors, HashMaps, and strings, and build clean, reusable, and flexible code with traits. By the end of the course, you’ll have a solid understanding of Rust’s collections and trait system to write efficient, modular code in a variety of domains. The course begins with the fundamentals of Rust’s collections: vectors, strings, and HashMaps. You’ll learn how to manipulate these data structures and apply ownership rules effectively. Then, you’ll dive into traits—defining, implementing, and using them to define shared behavior, enforce constraints, and ensure code reuse. Additionally, you’ll explore error handling techniques, which are crucial for robust Rust applications. This course is ideal for intermediate Rust programmers looking to deepen their knowledge and improve their code organization and structure. It is a perfect fit for anyone looking to write clean, idiomatic Rust code while mastering Rust’s powerful collection types and trait system.

Syllabus

  • Vectors
    • In this module, we will introduce you to vectors in Rust, including how to create, modify, and access elements. You'll learn about memory management, the get method for safe access, and the impact of ownership, concluding with a project to practice vector operations.
  • Project Structure
    • In this module, we will explore how to structure and organize your Rust projects using packages, crates, modules, and submodules. You will also learn how to manage visibility, resolve name conflicts, and incorporate external crates, with practical project examples to solidify your understanding.
  • Strings
    • In this module, we will review Rust’s string handling, from concatenation to common transformations, and learn how to safely handle user input. You'll practice working with strings through a project to reinforce your understanding of these core techniques.
  • HashMaps
    • In this module, we will dive into HashMaps and HashSets in Rust, focusing on creating, updating, and managing key-value pairs. You’ll explore advanced HashMap methods and learn how to manage unique data with HashSets, concluding with a hands-on project.
  • Error Handling
    • In this module, we will cover error handling in Rust, from the panic! macro to the ? operator and Result/Option types. You will learn how to propagate, manage, and handle errors, culminating in a project that demonstrates these concepts in action.
  • Traits
    • In this module, we will explore Rust’s trait system, from defining and implementing traits to using them for shared behavior across types. You will learn about advanced trait features, including trait bounds and inheritance, and apply them in a hands-on project to solidify your understanding.

Taught by

Packt - Course Instructors

Reviews

Start your review of Building Idiomatic Rust with Traits and Collections

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.