Trait Limitations, Object Safety, and the Orphan Rule
摘要
This chapter examines some of the most important boundaries and design rules that shape traits and trait objects in Rust. It begins by exploring the limitations of trait objects, explaining why not all traits can be turned into trait objects and how Rust enforces these constraints for safety and clarity. The discussion then moves to multiple traits and associated types, explaining how they interact and how they affect the way traits can be implemented or combined.