Server-side Programming Language

Intermediate Rust

This book is designed to transform you into a true Rust expert, equipping you with the skills and knowledge to tackle intricate challenges and craft high-quality, performant code.

What you will learn:

  1. Advanced-Data Structures in Rust: Besides data types and primary data structures, Rust supports more advanced data structures like HashMaps and Sets. Before we look into them, let's refresh our memory on the Vector data structure.

  2. Advanced Methods, Enums, and Pattern Matching: We have seen how methods work: when there is a struct, a method must be implemented for that struct to be able to use the data in the struct. Methods are also defined for enums and traits — concepts that we will explore after now. For now, let's revise some of the constructs of method implementations in general.

  3. Traits and Generics in Rust: In our earlier exploration of the Result and Option enums, you encountered using <T, E> and <T> within angle brackets. These constructs are known as generics. Generics are a powerful feature in programming that allows you to write functions, types, and structures that can work with different data types while maintaining type safety and code reusability.

  4. Lifetimes in Rust: Lifetimes is a fundamentally important concept that ensures that references remain valid and prevents issues like dangling pointers or references to memory that have been deallocated. To write safe and efficient Rust code, you must understand lifetimes and how to use them. This is one of Rust's most unique trademark features.

  5. Advanced Functions and Closures: By now, you must be good at writing functions in Rust. If you have prior programming experience, you would know that functions sometimes accept pointers as parameters. If you know functional programming, you must have heard about higher-order functions and closures. Let's take them step by step.

  6. Concurrency and Multithreading in Rust: This chapter will explore the world of concurrency and multithreading. Concurrency allows you to handle multiple tasks simultaneously, while multithreading takes advantage of multiple CPU cores for parallel execution. Rust's strong ownership and type system help ensure safe and efficient concurrent programming.

  7. Error Handling in Rust: This chapter will delve into Rust's intricacies. Effective error handling is a cornerstone of robust and reliable software. We'll explore the Result and Option types, learn how to use the match and ? operators for error handling, implement custom error types using the thiserror crate, and discover how the Result type aids in early returns within functions. This chapter will use real-world backend engineering scenarios to illustrate each concept.

  8. File I/O and Serialization: This comprehensive chapter will explore Rust's file input/output (I/O) operations and serialization. These topics are crucial for handling data in backend applications. We'll explore how to read and write files, perform serialization and deserialization using the serde crate, and work with various file formats like JSON and YAML. This chapter will use practical examples from a backend engineering perspective.

  9. Milestone Project: Building a Task Management App: We'll build a task management application using Rust in this exciting milestone project. This project will encompass concepts covered in the previous chapters, including structuring your code, error handling, file I/O, and more. Following these steps, you'll create a functional task manager allowing users to add, list, and mark tasks as completed.

This intermediate-level book dives deeper into Rust's features and concepts, enabling readers to develop more complex and robust applications.

Practical examples, exercises, and a hands-on project will ensure that you build confidence and competence in intermediate Rust programming.

Access the Intermediate Rust

Click on the button below to read the Intermediate Rust online

Whenever you're ready

There are 4 ways we can help you become a great backend engineer:

The MB Platform

Join 1000+ backend engineers learning backend engineering. Build real-world backend projects, learn from expert-vetted courses and roadmaps, track your learnings and set schedules, and solve backend engineering tasks, exercises, and challenges.

The MB Academy

The “MB Academy” is a 6-month intensive Advanced Backend Engineering BootCamp to produce great backend engineers.

Join Backend Weekly

If you like post like this, you will absolutely enjoy our exclusive weekly newsletter, Sharing exclusive backend engineering resources to help you become a great Backend Engineer.

Get Backend Jobs

Find over 2,000+ Tailored International Remote Backend Jobs or Reach 50,000+ backend engineers on the #1 Backend Engineering Job Board