Skip to content

Glossary: Rust Basics

Attribute

Also written: attributes

An instruction to the compiler written as `#[...]` above an item, such as `#[derive(Debug)]` above a struct.

Where the book teaches it

Related terms

#[derive(Debug)]Debug formatTrait