//str can transform into bytes //gets byte slice fn bytes(input:&str) -> &[u8] { input.as_bytes() } fn main(){ println!("{:?}", "fooo".as_bytes()); println!("{:?}", bytes("$$$")) }