pub struct TrustAnchorMode {
required_certifications: NumCertifications,
artifact_verifier_identity_domain_matches: HashSet<DomainName>,
trust_anchor_fingerprint_matches: HashSet<OpenpgpFingerprint>,
}Expand description
Settings for the trust-anchor mode.
Fields§
§required_certifications: NumCertificationsThe number of certifications from a trust-anchor required to exist for an artifact verifier.
artifact_verifier_identity_domain_matches: HashSet<DomainName>The identity of an artifact verifier must match one of the domains.
trust_anchor_fingerprint_matches: HashSet<OpenpgpFingerprint>The fingerprint of a trust anchor must match one of the fingerprints.
Implementations§
Source§impl TrustAnchorMode
impl TrustAnchorMode
Sourcepub fn new(
required_certifications: NumCertifications,
artifact_verifier_identity_domain_matches: HashSet<DomainName>,
trust_anchor_fingerprint_matches: HashSet<OpenpgpFingerprint>,
) -> Result<Self, Error>
pub fn new( required_certifications: NumCertifications, artifact_verifier_identity_domain_matches: HashSet<DomainName>, trust_anchor_fingerprint_matches: HashSet<OpenpgpFingerprint>, ) -> Result<Self, Error>
Creates a new TrustAnchorMode.
§Errors
Returns an error if required_certifications is larger than the length of
trust_anchor_fingerprint_matches.
Sourcepub(crate) fn from_config_with_defaults(
config: &ConfigTrustAnchorMode,
defaults: &TrustAnchorMode,
) -> Result<Self, Error>
pub(crate) fn from_config_with_defaults( config: &ConfigTrustAnchorMode, defaults: &TrustAnchorMode, ) -> Result<Self, Error>
Creates a new TrustAnchorMode from a ConfigTrustAnchorMode and another
TrustAnchorMode for defaults.
Sourcepub fn required_certifications(&self) -> NumCertifications
pub fn required_certifications(&self) -> NumCertifications
Returns the required number of certifications from a trust-anchor on an artifact verifier.
Sourcepub fn artifact_verifier_identity_domain_matches(&self) -> &HashSet<DomainName>
pub fn artifact_verifier_identity_domain_matches(&self) -> &HashSet<DomainName>
Returns a slice of the list of domains an artifact verifier must match at least one of.
Sourcepub fn trust_anchor_fingerprint_matches(&self) -> &HashSet<OpenpgpFingerprint>
pub fn trust_anchor_fingerprint_matches(&self) -> &HashSet<OpenpgpFingerprint>
Returns a slice of the list of fingerprints a trust-anchor must match at least one of.
Trait Implementations§
Source§impl Clone for TrustAnchorMode
impl Clone for TrustAnchorMode
Source§fn clone(&self) -> TrustAnchorMode
fn clone(&self) -> TrustAnchorMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TrustAnchorMode
impl Debug for TrustAnchorMode
Source§impl Default for TrustAnchorMode
impl Default for TrustAnchorMode
Source§fn default() -> TrustAnchorMode
fn default() -> TrustAnchorMode
Source§impl<'de> Deserialize<'de> for TrustAnchorMode
impl<'de> Deserialize<'de> for TrustAnchorMode
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>,
Source§impl Display for TrustAnchorMode
impl Display for TrustAnchorMode
Source§impl PartialEq for TrustAnchorMode
impl PartialEq for TrustAnchorMode
Source§impl Serialize for TrustAnchorMode
impl Serialize for TrustAnchorMode
Source§impl Validate for TrustAnchorMode
impl Validate for TrustAnchorMode
Source§fn validate_into(
&self,
__garde_user_ctx: &Self::Context,
__garde_path: &mut dyn FnMut() -> Path,
__garde_report: &mut Report,
)
fn validate_into( &self, __garde_user_ctx: &Self::Context, __garde_path: &mut dyn FnMut() -> Path, __garde_report: &mut Report, )
Self, aggregating all validation errors into Report.§fn validate(&self) -> Result<(), Report>where
Self::Context: Default,
fn validate(&self) -> Result<(), Report>where
Self::Context: Default,
Self, returning an Err with an aggregate of all errors if
the validation failed. Read more§fn validate_with(&self, ctx: &Self::Context) -> Result<(), Report>
fn validate_with(&self, ctx: &Self::Context) -> Result<(), Report>
Self, returning an Err with an aggregate of all errors if
the validation failed. Read moreimpl Eq for TrustAnchorMode
impl StructuralPartialEq for TrustAnchorMode
Auto Trait Implementations§
impl Freeze for TrustAnchorMode
impl RefUnwindSafe for TrustAnchorMode
impl Send for TrustAnchorMode
impl Sync for TrustAnchorMode
impl Unpin for TrustAnchorMode
impl UnwindSafe for TrustAnchorMode
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> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more