Loading tutorials
String, &str, and the rules for shared and mutable references.2 min readString, &str, structs, and basic generics. A lifetime is the span of code during which a reference is valid. Lifetime annotations describe relationships between references. They do not extend a value’s lifetime.1 min readString versus &str. A lifetime bound describes how long a reference may remain valid. It does not automatically extend the lifetime of data.1 min read