let s: String = "abcdefg".to_owned();
let s_slice: &str = &s[..]; // take a full slice of the string
pub trait Literal {
fn literal(&self) -> String;
}
// Using the .literal() method on a String or &str returns the String.
impl Literal for String { fn literal(&self) -> String { return self.clone() } }
impl Literal for &str { fn literal(&self) -> String { return String::from(*self); } }