pub struct BuildIdentity {
pub version: &'static str,
pub commit: &'static str,
pub dirty: &'static str,
pub built_at: String,
}Expand description
The source revision this binary was built from, stamped by build.rs.
Fields§
§version: &'static strCrate version. Coarse on its own — retained because it is the version an operator matches against a release, a changelog, and a crates.io page.
commit: &'static strFull commit hash of the source tree, or "unknown" for a build with no
repository (a crates.io tarball, a vendored copy, an export). Its rerun
triggers are registered in the build script, so unlike Self::dirty
it carries no staleness caveat.
dirty: &'static strWhether uncommitted changes were observed when the build script last
ran, or "unknown" when it could not be established.
"true" is trustworthy. "false" means “no uncommitted change was
observed”, NOT “the tree was provably clean.” Cargo cannot watch a
working tree, so a tree dirtied in a different workspace crate after
this script ran is reported clean. Stated here rather than left for a
reader to assume away — a limitation named is worth more than a boolean
that is silently wrong in one direction.
built_at: StringWhen the build script ran, RFC 3339, or "unknown". Honours
SOURCE_DATE_EPOCH, so a reproducible build gets a reproducible stamp
rather than this being the one field that defeats reproducibility.
Implementations§
Source§impl BuildIdentity
impl BuildIdentity
Trait Implementations§
Source§impl Clone for BuildIdentity
impl Clone for BuildIdentity
Source§fn clone(&self) -> BuildIdentity
fn clone(&self) -> BuildIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BuildIdentity
impl Debug for BuildIdentity
impl Eq for BuildIdentity
Source§impl PartialEq for BuildIdentity
impl PartialEq for BuildIdentity
Source§impl Serialize for BuildIdentity
impl Serialize for BuildIdentity
impl StructuralPartialEq for BuildIdentity
Auto Trait Implementations§
impl Freeze for BuildIdentity
impl RefUnwindSafe for BuildIdentity
impl Send for BuildIdentity
impl Sync for BuildIdentity
impl Unpin for BuildIdentity
impl UnsafeUnpin for BuildIdentity
impl UnwindSafe for BuildIdentity
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<M> EmbeddedConversationMessage for Mwhere
M: Serialize,
impl<M> EmbeddedConversationMessage for Mwhere
M: Serialize,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request