Lifetimes: Guaranteeing Reference Validity at Compile-Time

Lifetimes are annotations that describe the relationships between references, ensuring that borrowed data always outlives its references and preventing dangling pointers by validating their scope at compile time.

Sources

Open the full topic