string slice

&str

Reference, immutable

e.g.

let string: String = String::from("Hello, World");
let slice: &str = &string;
println!("Slice value: {}", slice);
// prints Slice value: Hello, World!
// or
// let slice: &str = &string [0..5];
// prints Hello

string is a string type (String) and equals "Hello, World!"
slice is a string slice and is an an immutable reference to string.

cf. String