pub struct BuildStamp {
pub git_revision: &'static str,
pub git_revision_cleanness: &'static str,
pub git_clean: bool,
pub git_status: &'static str,
pub build_time_seconds: u64,
pub build_time_nanos: u64,
}Expand description
Parameters from build time. Note that cargo won’t regenerate this if source files don’t change. I recommend a post-commit hook to touch build.rs if you want revs marked clean.
Fields§
§git_revision: &'static strCommit hash of HEAD at build time.
git_revision_cleanness: &'static strWhether the working directory was clean at build time.
git_clean: boolGit revision followed by a * if the status was not clean at the time.
git_status: &'static strOutput of git status at build time.
build_time_seconds: u64§build_time_nanos: u64Implementations§
Source§impl BuildStamp
impl BuildStamp
Sourcepub const fn git_revision(&self) -> &'static str
pub const fn git_revision(&self) -> &'static str
Commit hash of HEAD at build time.
Sourcepub const fn git_revision_cleanness(&self) -> &'static str
pub const fn git_revision_cleanness(&self) -> &'static str
Git revision followed by a * if the status was not clean at the time.
Sourcepub const fn git_status(&self) -> &'static str
pub const fn git_status(&self) -> &'static str
Output of git status at build time.
Sourcepub fn build_time(&self) -> SystemTime
pub fn build_time(&self) -> SystemTime
Local system time of build.
Trait Implementations§
Source§impl Clone for BuildStamp
impl Clone for BuildStamp
Source§fn clone(&self) -> BuildStamp
fn clone(&self) -> BuildStamp
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BuildStamp
impl RefUnwindSafe for BuildStamp
impl Send for BuildStamp
impl Sync for BuildStamp
impl Unpin for BuildStamp
impl UnwindSafe for BuildStamp
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