pub struct Language { /* private fields */ }Implementations§
Source§impl Language
impl Language
Sourcepub fn new(name: LanguageName, proficiency: ProficiencyLevel) -> Self
pub fn new(name: LanguageName, proficiency: ProficiencyLevel) -> Self
Examples found in repository?
examples/example_template_resume.rs (line 98)
11fn generate_resume(output_filename: &str, output_directory: &str) -> Result<(), ResumeBuilderError> {
12 let contact_info = ContactInfo::builder()
13 .name("Your Name".to_string())
14 .email(Email::new("youremail@example.com".to_string()))
15 .linkedin(LinkedInInfo::new("https://www.linkedin.com/in/yourprofile".to_string()))
16 .github(GitHubInfo::new("https://github.com/yourprofile".to_string()))
17 .phone(PhoneNumber::new("Your Phone Number".to_string()))
18 .location("City, State, ZIP Code".to_string())
19 .build()
20 .expect("Failed to build ContactInfo");
21
22 let resume = ResumeBuilder::new()
23 .contact_info(contact_info)
24 .abstract_text("A brief summary about yourself, your skills, and your career goals.".to_string())
25 .work_experience(vec![
26 ResumeWorkExperience::builder()
27 .company("Company Name".to_string())
28 .location("Location".to_string())
29 .role("Role".to_string())
30 .dates(date_range!(start => (2020, 1, 1), end => (2021, 12, 31)))
31 .responsibilities(vec![
32 "Responsibility or achievement 1".to_string(),
33 "Responsibility or achievement 2".to_string(),
34 "Responsibility or achievement 3".to_string(),
35 ])
36 .build(),
37 // Add more work experience as needed
38 ])
39 .education(vec![
40 ResumeEducationInfo::builder()
41 .institution("Institution Name".to_string())
42 .location("Location".to_string())
43 .degree("Degree Title".to_string())
44 .dates(date_range!(start => (2016, 9, 1), end => (2020, 6, 30)))
45 .build(),
46 // Add more education as needed
47 ])
48 .skills(vec![
49 skill!("Skill 1"),
50 skill!("Skill 2"),
51 skill!("Skill 3"),
52 skill!("Skill 4"),
53 ])
54 .projects(vec![
55 ResumeProject::builder()
56 .title("Project Title".to_string())
57 .dates(date_range!(start => (2019, 1, 1), end => (2019, 12, 31)))
58 .description(vec![
59 "Description of the project and your role in it".to_string(),
60 ])
61 .build(),
62 ResumeProject::builder()
63 .title("Project2 Title".to_string())
64 .dates(date_range!(start => (2024, 1, 1), end => (2024, 12, 31)))
65 .description(vec![
66 "Description of the second project and your role in it".to_string(),
67 ])
68 .build(),
69
70 ResumeProject::builder()
71 .title("Project3 Title".to_string())
72 .dates(date_range!(start => (2024, 3, 1), end => (2025, 12, 31)))
73 .description(vec![
74 "Description of the third project and your role in it".to_string(),
75 ])
76 .build(),
77 // Add more projects as needed
78 ])
79 .certifications(vec![
80 ResumeCertification::builder()
81 .name("Certification Name".to_string())
82 .issuing_organization("First Issuing Organization".to_string())
83 .date(date!(2020, 6, 1))
84 .build(),
85 ResumeCertification::builder()
86 .name("Certification2 Name".to_string())
87 .issuing_organization("Second Issuing Organization".to_string())
88 .date(date!(2021, 8, 10))
89 .build(),
90 ResumeCertification::builder()
91 .name("Certification3 Name".to_string())
92 .issuing_organization("Third Issuing Organization".to_string())
93 .date(date!(2023, 2, 14))
94 .build(),
95 // Add more certifications as needed
96 ])
97 .languages(vec![
98 Language::new(LanguageName::English, ProficiencyLevel::Native),
99 // Add more languages as needed
100 ])
101 .interests(vec![
102 ResumeInterest::new("Interest 1".to_string()),
103 ResumeInterest::new("Interest 2".to_string()),
104 ResumeInterest::new("Interest 3".to_string()),
105 ResumeInterest::new("Interest 4".to_string()),
106 ])
107 .build()
108 .expect("Failed to build resume");
109
110 let latex_content = resume.latex();
111
112 let output_path = format!("{}/{}", output_directory, output_filename);
113
114 write_content(&latex_content, &output_path)?;
115
116 pdflatex(output_directory, &output_path)?;
117
118 println!("Resume LaTeX file generated and compiled successfully.");
119
120 Ok(())
121}pub fn name(&self) -> &LanguageName
pub fn proficiency(&self) -> &ProficiencyLevel
Trait Implementations§
Source§impl LatexSectionItem for Language
impl LatexSectionItem for Language
fn render_latex_snippet(&self) -> String
Auto Trait Implementations§
impl Freeze for Language
impl RefUnwindSafe for Language
impl Send for Language
impl Sync for Language
impl Unpin for Language
impl UnwindSafe for Language
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more