---
title: "Chapter 16: Traits"
description: "The 11 lessons of chapter 16: Traits, in teaching order."
url: "https://learnrust.net/chapter-16/"
last_updated: "2026-06-13"
---

# Chapter 16: Traits

- [16.1 Introduction to traits](https://learnrust.net/chapter-16/introduction-to-traits.md): A trait defines shared behavior that many types can implement; defining a trait, implementing it for a type, and why traits are the structural center of Rust.
- [16.2 Default method implementations](https://learnrust.net/chapter-16/default-method-implementations.md): A trait can provide default method bodies that implementing types get for free, can override, and can build on by calling other trait methods.
- [16.3 Trait bounds](https://learnrust.net/chapter-16/trait-bounds.md): Trait bounds restrict a generic type parameter to types that implement a trait, finally making largest compile; the T: Trait syntax, where clauses, and multiple bounds.
- [16.4 impl Trait](https://learnrust.net/chapter-16/impl-trait.md): The impl Trait shorthand for some type implementing a trait, in argument and return position, and when it beats spelling out a generic parameter.
- [16.5 Deriving traits](https://learnrust.net/chapter-16/deriving-traits.md): A tour of the derivable traits (Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default), what each unlocks, and when you can't derive.
- [16.6 Display and ToString](https://learnrust.net/chapter-16/display-and-tostring.md): Implementing the Display trait for human-facing {} output, how it differs from Debug, and the free ToString conversion that Display unlocks.
- [16.7 Operator overloading with std::ops](https://learnrust.net/chapter-16/operator-overloading.md): Every operator is a trait: implementing Add, Mul, Index, and Neg for your own types, one lesson where C++ needs a whole chapter.
- [16.8 Conversions: From and Into](https://learnrust.net/chapter-16/from-and-into.md): The From and Into traits are the blessed way to convert between types; TryFrom for fallible conversions, and how the ? operator uses From to convert error types.
- [16.9 Trait objects: dyn Trait](https://learnrust.net/chapter-16/trait-objects.md): Trait objects let a collection hold different types that share a trait, with the method chosen at runtime; dynamic dispatch, Box<dyn Trait>, and the tradeoff with generics.
- [16.10 Code reuse without inheritance](https://learnrust.net/chapter-16/code-reuse-without-inheritance.md): Rust has no inheritance; how composition, default trait methods, and trait objects cover what inheritance was used for, and what to reach for when you miss it.
- [16.x Chapter 16 summary and quiz](https://learnrust.net/chapter-16/chapter-16-summary-and-quiz.md): Review of traits, default methods, bounds, impl Trait, deriving, Display, operators, From/Into, trait objects, and composition, with a chapter quiz and a capstone.

## Sitemap

See the full [sitemap](https://learnrust.net/sitemap.md) for all pages.
