give some alternatives to convert `&str` into `slice` in Rust
1. Using the `slice::from_ref` method: 
let str = String::from("hello"); 
let slice = str.as_str().slice::from_ref(&str);

2. Using the `into_bytes` method:
let str = String::from("hello"); 
let slice = str.into_bytes();

3. Using the `as_bytes` method:
let str = String::from("hello"); 
let slice = str.as_bytes();