pub enum GitInfo {
Absent,
Present(Option<Info>),
RecordedForTarball(Info),
}
Variants§
Absent
This is not a git repository.
Present(Option<Info>)
This is a git repository.
If the info should be used (omit_git_hash
is false), this will be
Some
, otherwise it will be None
.
RecordedForTarball(Info)
This is not a git repository, but the info can be fetched from the
git-commit-info
file.
Implementations§
Source§impl GitInfo
impl GitInfo
pub fn new(omit_git_hash: bool, dir: &Path) -> GitInfo
pub fn info(&self) -> Option<&Info>
pub fn sha(&self) -> Option<&str>
pub fn sha_short(&self) -> Option<&str>
pub fn commit_date(&self) -> Option<&str>
pub fn version(&self, build: &Build, num: &str) -> String
Sourcepub fn is_managed_git_subrepository(&self) -> bool
pub fn is_managed_git_subrepository(&self) -> bool
Returns whether this directory has a .git
directory which should be managed by bootstrap.
Sourcepub fn is_from_tarball(&self) -> bool
pub fn is_from_tarball(&self) -> bool
Returns whether this is being built from a tarball.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GitInfo
impl RefUnwindSafe for GitInfo
impl Send for GitInfo
impl Sync for GitInfo
impl Unpin for GitInfo
impl UnwindSafe for GitInfo
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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 80 bytes
Size for each variant:
Absent
: 0 bytesPresent
: 72 bytesRecordedForTarball
: 72 bytes