#[non_exhaustive]pub struct Pins {
pub commit: Option<String>,
pub binary_sha256: Option<String>,
pub runner_revision: Option<String>,
}Expand description
Identities the caller is asserting the evidence must match.
Why: cross-level agreement proves the three levels used ONE build and ONE
runner, but not that it was the FROZEN candidate. Only the operator knows
which commit was frozen, so they pin it; an unpinned field is simply not
checked rather than guessed at.
What: three optional expected values, compared verbatim against every
level’s metadata.
Test: bakeoff::tests::a_pinned_commit_mismatch_is_a_build_mismatch,
bakeoff::tests::a_pinned_runner_revision_mismatch_is_a_stale_runner.
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.commit: Option<String>The frozen candidate’s git commit.
binary_sha256: Option<String>SHA-256 of the binary built from that commit.
runner_revision: Option<String>The bake-off runner revision the invocation was defined against.
Implementations§
Source§impl Pins
impl Pins
Sourcepub fn new(
commit: Option<String>,
binary_sha256: Option<String>,
runner_revision: Option<String>,
) -> Self
pub fn new( commit: Option<String>, binary_sha256: Option<String>, runner_revision: Option<String>, ) -> Self
Build a pin set from the three optional expectations.
Why: Pins is #[non_exhaustive], so the tcode binary — a separate
crate from this library — cannot use a struct literal. A constructor
keeps the CLI wiring to one call and leaves the struct free to grow.
What: moves the three arguments in, in the order the CLI flags are
declared.
Test: bakeoff::tests::a_matching_pin_set_passes.
Trait Implementations§
impl Eq for Pins
impl StructuralPartialEq for Pins
Auto Trait Implementations§
impl Freeze for Pins
impl RefUnwindSafe for Pins
impl Send for Pins
impl Sync for Pins
impl Unpin for Pins
impl UnsafeUnpin for Pins
impl UnwindSafe for Pins
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,
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