Search⌘ K

Copy and Marker Traits

Explore how Rust's Copy trait, a marker trait, signals the compiler about cheap-to-copy types. Understand the relationship between Copy and Clone traits and how to implement them for custom types.

We'll cover the following...

We’ve previously talked about copyable types. As a reminder, those are types that are so cheap to clone that the compiler will do it for you automatically. Rust identifies these types with a special trait called Copy ...