Struct vergen_gitcl::GitclBuilder
source · pub struct GitclBuilder { /* private fields */ }Expand description
Builder for Gitcl.
Implementations§
source§impl GitclBuilder
impl GitclBuilder
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>
The value is determined with the following command
git log -1 --pretty=format:'%cs'
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>
sourcepub fn use_local(&mut self, value: bool) -> &mut Self
pub fn use_local(&mut self, value: bool) -> &mut Self
Enable local offset date/timestamp output
source§impl GitclBuilder
impl GitclBuilder
sourcepub fn all(&mut self) -> &mut Self
pub fn all(&mut self) -> &mut Self
Convenience method to setup the GitclBuilder 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 GitclBuilder
impl Clone for GitclBuilder
source§fn clone(&self) -> GitclBuilder
fn clone(&self) -> GitclBuilder
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 GitclBuilder
impl RefUnwindSafe for GitclBuilder
impl Send for GitclBuilder
impl Sync for GitclBuilder
impl Unpin for GitclBuilder
impl UnwindSafe for GitclBuilder
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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