Skip to content

Glossary: Rust Basics

String literal

Also written: &str, string

Quoted text typed into code, such as "Bloom Café", whose type is `&str`, a borrowed view of text stored in your program. Functions that only read text should take `&str`.

Where the book teaches it

Related terms

StringSlice