Struct build_info_common::GitInfo
source · [−]pub struct GitInfo {
pub commit_id: String,
pub commit_short_id: String,
pub commit_timestamp: DateTime<Utc>,
pub dirty: bool,
pub branch: Option<String>,
pub tags: Vec<String>,
}
Expand description
Information about a git repository
If a git repository is detected (and, thereby, this information included), the build script will be rerun whenever the currently checked out commit changes.
Fields
commit_id: String
Full commit hash for the currently checked out commit
commit_short_id: String
Short commit hash for the currently checked out commit
The length of this string depends on the effective value of the git configuration variable core.abbrev
, and is
extended to the minimum length required for the id to be unique (at the time it was computed).
commit_timestamp: DateTime<Utc>
Timestamp of the currently checked out commit
dirty: bool
true
iff the repository had uncommitted changes when building the project.
branch: Option<String>
Names the branch that is currently checked out, if any
All tags that point to the current commit (e.g., ["v0.0.10", "sample@v0.0.10"]
)
Trait Implementations
sourceimpl<'de> Deserialize<'de> for GitInfo
impl<'de> Deserialize<'de> for GitInfo
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Ord for GitInfo
impl Ord for GitInfo
sourceimpl PartialOrd<GitInfo> for GitInfo
impl PartialOrd<GitInfo> for GitInfo
sourcefn partial_cmp(&self, other: &GitInfo) -> Option<Ordering>
fn partial_cmp(&self, other: &GitInfo) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for GitInfo
impl StructuralEq for GitInfo
impl StructuralPartialEq for GitInfo
Auto Trait Implementations
impl RefUnwindSafe for GitInfo
impl Send for GitInfo
impl Sync for GitInfo
impl Unpin for GitInfo
impl UnwindSafe for GitInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more