Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Events
Videos
Audiobooks
Packt Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Rust for C++ Developers

You're reading from   Rust for C++ Developers Leverage your C++ expertise to write safer and faster systems code in Rust

Arrow left icon
Product type Paperback
Published in Mar 2026
Publisher Packt
ISBN-13 9781836206514
Length 318 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Dan Olson Dan Olson
Author Profile Icon Dan Olson
Dan Olson
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1: Understanding Rust Basics
2. Chapter 1: Why Choose Rust? FREE CHAPTER 3. Chapter 2: Working with Rust Syntax 4. Chapter 3: The Rust Safety Model 5. Chapter 4: Managing Rust Projects with Cargo 6. Part 2: Exploring the Rust Standard Library
7. Chapter 5: Data Structures 8. Chapter 6: Reading and Writing Files 9. Chapter 7: Understanding Iterators 10. Chapter 8: Object-Oriented Programming 11. Chapter 9: Working with C++ in Rust 12. Part 3: Moving into Advanced Rust
13. Chapter 10: Optimization in Rust 14. Chapter 11: Multithreading in Rust 15. Chapter 12: Metaprogramming with Macros 16. Chapter 13: Continuing with Rust 17. Chapter 15: Unlock Your Exclusive Benefits 18. Index
Appendix: Setting Up The Development Environment

8

Object-Oriented Programming

Object-oriented programming (OOP) has been a very popular paradigm in the programming community over the last few decades. Several popular languages either explicitly embrace the object-oriented paradigm or style themselves as "multi-paradigm" languages with some level of support for it.

Rust falls in the latter category, and in this chapter, we'll learn about Rust's unique take on object orientation, see how it contrasts with C++'s approach, and examine how it can be combined with Rust's functional influences.

In this chapter, we're going to cover the following main topics:

  • Understanding object-oriented principles
  • Examining object-oriented foundations in Rust
  • Moving beyond object orientation
lock icon The rest of the chapter is locked
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Rust for C++ Developers
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime
Modal Close icon
Modal Close icon