pub struct Git2Builder { /* private fields */ }Expand description
Builder for Git2.
Implementations§
Source§impl Git2Builder
impl Git2Builder
Sourcepub fn repo_path(&mut self, value: Option<PathBuf>) -> &mut Self
pub fn repo_path(&mut self, value: Option<PathBuf>) -> &mut Self
An optional path to a repository.
Sourcepub fn branch(&mut self, value: bool) -> &mut Self
pub fn branch(&mut self, value: bool) -> &mut Self
Emit the current git branch
cargo:rustc-env=VERGEN_GIT_BRANCH=<BRANCH_NAME>Emit the author email of the most recent commit
cargo:rustc-env=VERGEN_GIT_COMMIT_AUTHOR_EMAIL=<AUTHOR_EMAIL>Emit the author name of the most recent commit
cargo:rustc-env=VERGEN_GIT_COMMIT_AUTHOR_NAME=<AUTHOR_NAME>Sourcepub fn commit_count(&mut self, value: bool) -> &mut Self
pub fn commit_count(&mut self, value: bool) -> &mut Self
Emit the total commit count to HEAD
cargo:rustc-env=VERGEN_GIT_COMMIT_COUNT=<COUNT>Sourcepub fn commit_message(&mut self, value: bool) -> &mut Self
pub fn commit_message(&mut self, value: bool) -> &mut Self
Emit the commit message of the latest commit
cargo:rustc-env=VERGEN_GIT_COMMIT_MESSAGE=<MESSAGE>Sourcepub fn commit_date(&mut self, value: bool) -> &mut Self
pub fn commit_date(&mut self, value: bool) -> &mut Self
Emit the commit date of the latest commit
cargo:rustc-env=VERGEN_GIT_COMMIT_DATE=<YYYY-MM-DD>Sourcepub fn commit_timestamp(&mut self, value: bool) -> &mut Self
pub fn commit_timestamp(&mut self, value: bool) -> &mut Self
Emit the commit timestamp of the latest commit
cargo:rustc-env=VERGEN_GIT_COMMIT_TIMESTAMP=<YYYY-MM-DDThh:mm:ssZ>Source§impl Git2Builder
impl Git2Builder
Sourcepub fn all(&mut self) -> &mut Self
pub fn all(&mut self) -> &mut Self
Convenience method to setup the Git2Builder with all of the VERGEN_GIT_* instructions on
Sourcepub fn describe(
&mut self,
tags: bool,
dirty: bool,
matches: Option<&'static str>,
) -> &mut Self
pub fn describe( &mut self, tags: bool, dirty: bool, matches: Option<&'static str>, ) -> &mut Self
Emit the describe output
cargo:rustc-env=VERGEN_GIT_DESCRIBE=<DESCRIBE>Optionally, add the dirty or tags flag to describe.
See git describe for more details
Sourcepub fn dirty(&mut self, include_untracked: bool) -> &mut Self
pub fn dirty(&mut self, include_untracked: bool) -> &mut Self
Emit the dirty state of the git repository
cargo:rustc-env=VERGEN_GIT_DIRTY=(true|false)Optionally, include untracked files when determining the dirty status of the repository.
Sourcepub fn sha(&mut self, short: bool) -> &mut Self
pub fn sha(&mut self, short: bool) -> &mut Self
Emit the SHA of the latest commit
cargo:rustc-env=VERGEN_GIT_SHA=<SHA>Optionally, add the short flag to rev-parse.
See git rev-parse for more details.
Trait Implementations§
Source§impl Clone for Git2Builder
impl Clone for Git2Builder
Source§fn clone(&self) -> Git2Builder
fn clone(&self) -> Git2Builder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Git2Builder
impl RefUnwindSafe for Git2Builder
impl Send for Git2Builder
impl Sync for Git2Builder
impl Unpin for Git2Builder
impl UnwindSafe for Git2Builder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more