#[non_exhaustive]pub struct BuildProvenance {
pub version: String,
pub commit: String,
pub commit_date: String,
pub binary_sha256: String,
pub dirty: bool,
}Expand description
Which tcode binary produced the level.
Why: “results produced by a different Trusty Code build” is one of the five
rejections #5441 names. version/commit/commit_date mirror
crate::build_info::provenance_json so the metadata can be cross-checked
against the level’s own tcode_report.json rather than trusted; the binary
hash is what survives when the source tree is gone.
What: the three report fields plus a SHA-256 of the invoked binary and a
dirty flag for the candidate checkout.
Test: bakeoff::tests::report_build_mismatch_is_rejected.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.version: StringCrate semver, matching tcode_report.json’s build.version.
commit: StringShort git commit, matching tcode_report.json’s build.commit.
commit_date: StringCommit date, matching tcode_report.json’s build.commit_date.
binary_sha256: StringSHA-256 of the tcode binary that was invoked.
dirty: boolWhether the candidate checkout had uncommitted changes.
Trait Implementations§
Source§impl Clone for BuildProvenance
impl Clone for BuildProvenance
Source§impl Debug for BuildProvenance
impl Debug for BuildProvenance
Source§impl<'de> Deserialize<'de> for BuildProvenance
impl<'de> Deserialize<'de> for BuildProvenance
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 BuildProvenance
Source§impl PartialEq for BuildProvenance
impl PartialEq for BuildProvenance
Source§impl Serialize for BuildProvenance
impl Serialize for BuildProvenance
impl StructuralPartialEq for BuildProvenance
Auto Trait Implementations§
impl Freeze for BuildProvenance
impl RefUnwindSafe for BuildProvenance
impl Send for BuildProvenance
impl Sync for BuildProvenance
impl Unpin for BuildProvenance
impl UnsafeUnpin for BuildProvenance
impl UnwindSafe for BuildProvenance
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more