pub struct BuildInfo {
pub version: String,
pub git_sha: String,
pub git_describe: String,
pub git_branch: String,
pub dirty: bool,
pub built_at: String,
}Expand description
Build provenance for one artifact (frontend or backend). The wire contract
for the backend’s GET /api/version, and the shape the frontend mirrors for
its own baked-in info. Every field degrades to "unknown" (or dirty=false)
rather than failing a build, so a build without git context still produces a
well-formed value.
Fields§
§version: StringSemver from the manifest (Cargo.toml / package.json), e.g. "0.16.0".
git_sha: StringShort commit hash, e.g. "a1b2c3d", or "unknown".
git_describe: Stringgit describe --tags --always --dirty, e.g. "v0.16.0",
"v0.16.0-3-ga1b2c3d", "v0.16.0-dirty", or "unknown".
git_branch: StringBranch at build, e.g. "master", or "unknown".
dirty: boolTrue if the working tree had uncommitted changes at build.
built_at: StringRFC 3339 UTC build timestamp, e.g. "2026-07-14T11:20:05Z", or "unknown".
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BuildInfo
impl<'de> Deserialize<'de> for BuildInfo
Source§fn 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
impl Eq for BuildInfo
impl StructuralPartialEq for BuildInfo
Auto Trait Implementations§
impl Freeze for BuildInfo
impl RefUnwindSafe for BuildInfo
impl Send for BuildInfo
impl Sync for BuildInfo
impl Unpin for BuildInfo
impl UnsafeUnpin for BuildInfo
impl UnwindSafe for BuildInfo
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