Generation

class from descriptionSat, 12 Nov 2022

Create a class to produce web page

fn main() { let mut web_page = WebPage::new(); web_page.set_title(String::from("Rust web page")); web_page.set_body(String::from("Some text ....")); web_page.set_body_color(String::from("red")); web_page.set_body_font(String::from("Helvetica")); web_page.set_body_size(String::from("12")); web_page.set_body_weight(String::from("bold")); println!("{}", web_page.render()); }

Questions about programming?Chat with your personal AI assistant