pub struct OpenpgpSettings {
num_data_signatures: NumDataSignatures,
pub(crate) verification_method: VerificationMethod,
}Expand description
OpenPGP settings.
Fields§
§num_data_signatures: NumDataSignaturesThe number of signatures required for an artifact to be considered valid.
verification_method: VerificationMethodThe verification method to use.
Implementations§
Source§impl OpenpgpSettings
impl OpenpgpSettings
Sourcepub fn new(
num_data_signatures: NumDataSignatures,
verification_method: VerificationMethod,
) -> Result<Self, Error>
pub fn new( num_data_signatures: NumDataSignatures, verification_method: VerificationMethod, ) -> Result<Self, Error>
Creates a new OpenpgpSettings.
§Errors
Returns an error if validation for the created OpenpgpSettings fails:
The verification_method uses PlainMode and num_data_signatures is larger than the
length of the verification mode’s fingerprint_matches,
Sourcepub(crate) fn from_config_with_defaults(
config_openpgp_settings: &ConfigOpenpgpSettings,
defaults: &OpenpgpSettings,
) -> Result<Self, Error>
pub(crate) fn from_config_with_defaults( config_openpgp_settings: &ConfigOpenpgpSettings, defaults: &OpenpgpSettings, ) -> Result<Self, Error>
Creates a new OpenpgpSettings from a ConfigOpenpgpSettings and explicit defaults.
§Errors
Returns an error if TrustAnchorMode::from_config_with_defaults fails.
Sourcepub fn num_data_signatures(&self) -> NumDataSignatures
pub fn num_data_signatures(&self) -> NumDataSignatures
Returns the required number of data signatures required for an artifact to be considered valid.
Sourcepub fn verification_method(&self) -> &VerificationMethod
pub fn verification_method(&self) -> &VerificationMethod
Returns a reference to the OpenPGP verification method.
Trait Implementations§
Source§impl Clone for OpenpgpSettings
impl Clone for OpenpgpSettings
Source§fn clone(&self) -> OpenpgpSettings
fn clone(&self) -> OpenpgpSettings
Returns a duplicate of the value. Read more
1.0.0 · 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 OpenpgpSettings
impl Debug for OpenpgpSettings
Source§impl Default for OpenpgpSettings
impl Default for OpenpgpSettings
Source§fn default() -> OpenpgpSettings
fn default() -> OpenpgpSettings
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OpenpgpSettings
impl<'de> Deserialize<'de> for OpenpgpSettings
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for OpenpgpSettings
impl Display for OpenpgpSettings
Source§impl PartialEq for OpenpgpSettings
impl PartialEq for OpenpgpSettings
Source§impl Serialize for OpenpgpSettings
impl Serialize for OpenpgpSettings
Source§impl Validate for OpenpgpSettings
impl Validate for OpenpgpSettings
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, )
Validates
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,
Validates
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>
Validates
Self, returning an Err with an aggregate of all errors if
the validation failed. Read moreimpl Eq for OpenpgpSettings
impl StructuralPartialEq for OpenpgpSettings
Auto Trait Implementations§
impl Freeze for OpenpgpSettings
impl RefUnwindSafe for OpenpgpSettings
impl Send for OpenpgpSettings
impl Sync for OpenpgpSettings
impl Unpin for OpenpgpSettings
impl UnwindSafe for OpenpgpSettings
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,
§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>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more