trait PhraseOut {
fn print_phrase(&self);
}
struct Phrase {
phrase_text: String
}
impl PhraseOut for Phrase {
fn print_phrase(&self) {
println!("{}", self.phrase_text);
}
}
fn main() {
let _text = String::from("Hi 👋! My name is Alexander \n \
I'm just here to learn and hopefully to become developer one day ");
let _phrase: Phrase = Phrase { phrase_text: _text};
_phrase.print_phrase();
}
Block or Report
Block or report Whuzurbuddha
Report abuse
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abusePinned Loading
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.