July 31, 2023, 11:09 a.m. | Dsysd Dev

DEV Community dev.to

When learning Rust, the first time one encounters a compilation error that states about lifetimes, can be a confusing experience.


The first thing to understand about lifetimes is that it provides yet another level of security to our program.


As we all know and probably do, sharing references is a lot better than passing data by copying their values.


Though, references are easily out of scope when not considered carefully.


So for instance



let mut r: &Vec< …

beginners data error experience lifetime program rust security sharing states tutorial understand understanding

SOC 2 Manager, Audit and Certification

@ Deloitte | US and CA Multiple Locations

Security Officer Hospital Laguna Beach

@ Allied Universal | Laguna Beach, CA, United States

Sr. Cloud DevSecOps Engineer

@ Oracle | NOIDA, UTTAR PRADESH, India

Cloud Operations Security Engineer

@ Elekta | Crawley - Cornerstone

Cybersecurity – Senior Information System Security Manager (ISSM)

@ Boeing | USA - Seal Beach, CA

Engineering -- Tech Risk -- Security Architecture -- VP -- Dallas

@ Goldman Sachs | Dallas, Texas, United States