const kennetham = {
pronouns: "he" | "him",
company: "Eksklushift" | "treatsure",
code: ["C#", "C++", "Java", "Javascript", "Python", "Ruby", "Rust", "Scala", "Typescript"],
technologies: {
cloud: ["AWS", "Azure", "Google", "OpenStack"],
devops: ["Docker", "Kubernetes"]
},
architecture: ["Microservices", "Serverless", "Event-driven", "Distributed Systems", "Design Patterns"],
techCommunities: {
speaker: "Microsoft MVP",
mentor: "GenerationSG", "Others"
},
challenge: "I am doing the #100DaysOfRust to build a client-server application on rust."
};
struct Profile {
pronouns: String,
code: [String; 8],
name: String,
role: String,
language: [String; 4]
}
impl Profile {
fn new() -> Profile {
Profile {
pronouns: "he | him".to_string(),
code: ["C#".to_string(), "C++".to_string(), "Java".to_string(), "Javascript".to_string(), "Python".to_string(), "Ruby".to_string(), "Rust".to_string(), "Scala".to_string(), "Typescript".to_string()],
name: "Kenneth Ham".to_string(),
role: "CTO".to_string(),
language: ["en_SG".to_string(), "zh_CN".to_string(), "ja_JP".to_string(), "ru_RU".to_string()]
}
}
fn say_hi(&self) {
println!("hello world!");
println!("{}", self.pronouns);
println!("My name is {}, and I am a {}", self.name, self.role);
println!("I can speak these languages: {}, {}, {}, {}", self.language[0], self.language[1], self.language[2], self.language[3]);
println!("I can code in the following programming languages:");
for c in &self.code {
println!("{}", c)
}
}
}
fn main() {
let profile = Profile::new();
profile.say_hi();
}