derive
Asking the compiler to write standard behavior for a type.
#[derive(Debug, Clone, PartialEq)] generates standard trait implementations for a type.
Examples
#[derive(Debug, Clone, PartialEq)]onBooklets you print it with{:?}, copy it with.clone()and compare two books with==.
See also