Rust · Macro
derive
The derive attribute runs derive macros that generate code for structs, enums, and unions. Rust includes built-in derives such as Clone, Debug, and PartialEq.
Last updated
Syntax
#[derive(Macro1, Macro2, ...)]In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
CloneCopyDebugDefaultEqHashOrdPartialEq