Skip to content

Glossary: Algorithms Beyond the Basics in Rust

Derive

Also written: #[derive], derive

An attribute like `#[derive(Clone)]` placed above a struct that makes Rust write standard methods for it, such as `clone`, `==` or `default`.

Where the book teaches it

Related terms

Copy (of a vector)