1 2 3 4 5 6 7 8 9 10 11 12 13 14
#[derive(Debug, Clone)] pub struct Config { pub token: String, pub user_agent: String, } impl Config { pub fn new(token: &str, user_agent: &str) -> Config { Config { token: token.to_owned(), user_agent: user_agent.to_owned(), } } }