pub struct LastGitCommit { /* private fields */ }Implementations§
Source§impl LastGitCommit
impl LastGitCommit
Sourcepub fn new() -> LastGitCommitBuilder
pub fn new() -> LastGitCommitBuilder
Create new builder
Examples found in repository?
More examples
examples/id_example.rs (line 5)
3fn main() {
4
5 let lgc = LastGitCommit::new().build().unwrap();
6 let long = lgc.id().long();
7 let short = lgc.id().short();
8 let range = lgc.id().range(0..3).unwrap();
9
10 println!("Long: {}", long); // "c4f94258c12b8905f3d57f879ae1171ce367cd29"
11 println!("Short: {}", short); // "c4f9425"
12 println!("Range: {}", range); // "c4f"
13
14}Sourcepub fn id(&self) -> &Id
pub fn id(&self) -> &Id
Get commit id (hash)
Examples found in repository?
examples/id_example.rs (line 6)
3fn main() {
4
5 let lgc = LastGitCommit::new().build().unwrap();
6 let long = lgc.id().long();
7 let short = lgc.id().short();
8 let range = lgc.id().range(0..3).unwrap();
9
10 println!("Long: {}", long); // "c4f94258c12b8905f3d57f879ae1171ce367cd29"
11 println!("Short: {}", short); // "c4f9425"
12 println!("Range: {}", range); // "c4f"
13
14}Auto Trait Implementations§
impl Freeze for LastGitCommit
impl RefUnwindSafe for LastGitCommit
impl Send for LastGitCommit
impl Sync for LastGitCommit
impl Unpin for LastGitCommit
impl UnsafeUnpin for LastGitCommit
impl UnwindSafe for LastGitCommit
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