8000 GitHub - Spacebody/Spacebody: Github profile
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Spacebody/Spacebody

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

Anurag's GitHub stats

impl Spacebody {
    pub fn introduce() -> Spacebody {
        Spacebody {
            name: "Jerry",
            sex: "Male",
            location: Location {
                city: "Hangzhou",
                country: "China",
            },
            profession: "BackEnd",
            emails: vec!["510662916@qq.com", "jerryzyl18@gmail.com"],
            blog: "https://blog.yilin.dev",
            skills: vec!["Spring/SpringBoot", "Microservices", "Docker"],
            languages: vec!["Java", "C/C++", "Rust"],
            hobbies: vec!["Reading", "Photography"],
            status: vec![Status::BusyForWork, Status::EnjoyHolidays, Status::SeekTrueLove].choose(&mut rand::thread_rng()).unwrap().clone(),
        }
    }
}

#[derive(Debug)]
pub struct Spacebody {
    name: &'static str,
    sex: &'static str,
    location: Location,
    profession: &'static str,
    emails: Vec<&'static str>,
    blog: &'static str,
    skills: Vec<&'static str>,
    languages: Vec<&'static str>,
    hobbies: Vec<&'static str>,
    status: Status,
}

#[derive(Debug, Copy, Clone)]
enum Status {
    BusyForWork, 
    EnjoyHolidays,
    SeekTrueLove,
}

#[derive(Debug)]
struct Location {
    city: &'static str,
    country: &'static str
}

use rand::seq::SliceRandom;
0