pub struct PinnedDigests(/* private fields */);Expand description
Digests the operator has independently confirmed, keyed by version.
This is the only way a package with no published checksum is ever
installed. It is a deliberate, named, per-version act by an operator — not a
switch that turns verification off — which is the difference
05-infrastructure.md draws between “require an operator-pinned digest” and
“skip the check”.
Implementations§
Source§impl PinnedDigests
impl PinnedDigests
pub fn new() -> Self
Sourcepub fn pin(self, version: &str, digest: &str) -> Result<Self, PackageError>
pub fn pin(self, version: &str, digest: &str) -> Result<Self, PackageError>
Pin digest for version.
§Errors
PackageError::UnrecognisedVersion or
PackageError::MalformedDigest when either value is not well formed.
pub fn get(&self, version: &RunnerVersion) -> Option<&Sha256Hex>
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for PinnedDigests
impl Clone for PinnedDigests
Source§fn clone(&self) -> PinnedDigests
fn clone(&self) -> PinnedDigests
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PinnedDigests
impl Debug for PinnedDigests
Source§impl Default for PinnedDigests
impl Default for PinnedDigests
Source§fn default() -> PinnedDigests
fn default() -> PinnedDigests
Returns the “default value” for a type. Read more
impl Eq for PinnedDigests
Source§impl PartialEq for PinnedDigests
impl PartialEq for PinnedDigests
impl StructuralPartialEq for PinnedDigests
Auto Trait Implementations§
impl Freeze for PinnedDigests
impl RefUnwindSafe for PinnedDigests
impl Send for PinnedDigests
impl Sync for PinnedDigests
impl Unpin for PinnedDigests
impl UnsafeUnpin for PinnedDigests
impl UnwindSafe for PinnedDigests
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
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§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
Compare self to
key and return true if they are equal.