Hacker News new | ask | show | jobs
by jamincan 1327 days ago
`&'static str` is an `&str` (string slice) with a `'static` lifetime (ie. lasting the duration of the program). It is most commonly encountered with string literals.

In some languages, it is appropriate to gloss over the differences between `String`, `&str`, and `&'static str`, but in Rust, all of those details are meaningful and important. If distinguishing between them isn't important to you, there are other languages that probably better reflect your needs.