1use std::path::PathBuf;
9
10mod author;
11mod id;
12mod builder;
13use builder::LastGitCommitBuilder;
14
15pub struct LastGitCommit {
16 path: PathBuf,
17 branch: String,
18 message: Option<String>,
19 author: author::Author,
20 id: id::Id,
21 timestamp: i64
22}
23
24impl LastGitCommit {
25
26 pub fn new() -> LastGitCommitBuilder {
28
29 LastGitCommitBuilder::new()
30
31 }
32
33 pub fn path(&self) -> &PathBuf {
35
36 &self.path
37
38 }
39
40 pub fn branch(&self) -> &String {
42
43 &self.branch
44
45 }
46
47 pub fn message(&self) -> Option<&String> {
49
50 self.message.as_ref()
51
52 }
53
54 pub fn author(&self) -> &author::Author {
56
57 &self.author
58
59 }
60
61 pub fn id(&self) -> &id::Id {
63
64 &self.id
65
66 }
67
68 pub fn timestamp(&self) -> i64 {
70
71 self.timestamp
72
73 }
74
75}