#[derive(...)] is a procedural macro: it receives the token stream of your type and returns generated code, which is compiled alongside it.
#[derive(Debug)] writes a Debug impl that prints every field by name. #[derive(Clone)] writes a clone that clones every field. #[derive(PartialEq)] compares every field. #[derive(Default)] fills each field with its own default — 0, false, String::new().
Nothing is special-cased in the compiler. The output is ordinary Rust, and cargo expand will show it to you.
