This example shows how Rust uses lifetimes in structs to keep references safe. We define a struct Holder with a lifetime 'a to hold a reference to a string slice. We create a String variable text and then create an instance h of Holder that holds a reference to text. Rust ensures that h's reference does not outlive text. When we print h.value, it safely shows "hello". At the end of main, both text and h go out of scope, and Rust cleans up safely without any dangling references. Lifetimes prevent errors by making sure references inside structs are valid as long as needed but no longer.