pub struct BuildRecord {
pub builder: String,
pub source_repo: String,
pub source_commit: String,
pub recipe: String,
pub toolchain: String,
pub network: bool,
pub materials: Vec<Subject>,
pub subjects: Vec<Subject>,
pub started_at_unix_ms: i64,
pub finished_at_unix_ms: i64,
}Expand description
What a builder claims about one build.
Fields§
§builder: StringThe ACL principal that ran the build. A principal, not a hostname: the question a verifier asks is whose builder was this, and a hostname answers a different one.
source_repo: String<namespace>/<repo> the source came from.
source_commit: StringThe commit that was built, hex. This is the join to links 2–4.
recipe: StringWhat the build was asked to make — a recipe, an atom, a variant name.
toolchain: StringThe toolchain, as the builder resolved it (rustc 1.85.0 (…)).
Free text on purpose: pinning a structure here would make a build with an unusual toolchain unrecordable, and an unrecordable build is one that happens anyway and is not attested.
network: boolWhether the build had network access.
A claim by the builder about itself, and the module docs say what that is worth. It is recorded rather than omitted because a record that cannot express “this was not hermetic” makes every build look hermetic.
materials: Vec<Subject>What went in: pinned sources, vendored dependencies, base images.
subjects: Vec<Subject>What came out.
started_at_unix_ms: i64When it started, in Unix milliseconds.
finished_at_unix_ms: i64When it finished, in Unix milliseconds.
Implementations§
Source§impl BuildRecord
impl BuildRecord
Sourcepub fn signing_bytes(&self) -> Vec<u8> ⓘ
pub fn signing_bytes(&self) -> Vec<u8> ⓘ
The exact bytes that are signed.
A canonical, line-oriented rendering rather than the JSON, for the same reason a tree head signs one: JSON has no canonical form, so signing a serialisation makes the signature depend on the serialiser’s field order. Every field appears once, in a fixed order, and the lists are rendered in the order the builder recorded them.
Sourcepub fn digest(&self) -> String
pub fn digest(&self) -> String
SHA-256 over Self::signing_bytes, hex — the record’s own identity.
Trait Implementations§
Source§impl Clone for BuildRecord
impl Clone for BuildRecord
Source§impl Debug for BuildRecord
impl Debug for BuildRecord
Source§impl<'de> Deserialize<'de> for BuildRecord
impl<'de> Deserialize<'de> for BuildRecord
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>,
impl Eq for BuildRecord
Source§impl PartialEq for BuildRecord
impl PartialEq for BuildRecord
Source§impl Serialize for BuildRecord
impl Serialize for BuildRecord
impl StructuralPartialEq for BuildRecord
Auto Trait Implementations§
impl Freeze for BuildRecord
impl RefUnwindSafe for BuildRecord
impl Send for BuildRecord
impl Sync for BuildRecord
impl Unpin for BuildRecord
impl UnsafeUnpin for BuildRecord
impl UnwindSafe for BuildRecord
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.