Structs usually own their data. But sometimes you want a struct to hold a reference — and the moment it does, the struct needs a lifetime annotation.
A struct that borrows
If a struct field is a reference, the struct can't outlive whatever that reference points at. Otherwise the struct would hold a dangling reference — exactly what the borrow checker forbids. So you annotate the struct with a lifetime, tying the struct's validity to the borrowed data's.
What the annotation enforces
A struct declared with 'a can't outlive the data its reference borrows. Try to keep the struct around after the borrowed value drops, and the compiler refuses. The annotation isn't bookkeeping for its own sake — it's the compiler propagating the 'references can't dangle' rule through your own types.
String owns its data and has no lifetime headaches. A struct holding a &str avoids a copy but ties itself to the borrowed source. Reach for borrowed fields only when the copy genuinely matters.This is where beginners feel the wall
Reference-holding structs are where lifetime annotations cascade — a borrowed field forces a lifetime on the struct, on its impl blocks, and on methods returning the field. It's the most annotation-heavy corner of everyday Rust, and the honest advice is: start with owned fields, reach for borrows only when profiling says the copy matters.