ValidUserAttributeAmalgamation

Type Alias ValidUserAttributeAmalgamation 

Source
pub type ValidUserAttributeAmalgamation<'a> = ValidComponentAmalgamation<'a, UserAttribute>;
Expand description

A Valid User Attribute and its associated data.

A specialized version of ValidComponentAmalgamation.

Aliased Type§

pub struct ValidUserAttributeAmalgamation<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> ValidUserAttributeAmalgamation<'a>

Source

pub fn user_attribute(&self) -> &'a UserAttribute

Returns a reference to the User Attribute.

This is just a type-specific alias for ValidComponentAmalgamation::component.

§Examples
// Display some information about the User IDs.
for ua in cert.user_attributes() {
    eprintln!(" - {:?}", ua.user_attribute());
}
Source

pub fn approved_certifications( &self, ) -> impl Iterator<Item = &Signature> + Send + Sync

Returns the user attributes’ approved third-party certifications.

This feature is experimental.

Allows the certificate owner to approve of third party certifications. See Approved Certifications subpacket for details. This can be used to address certificate flooding concerns.

This method only returns signatures that are valid under the current policy and are approved by the certificate holder.

Source

pub fn certification_approval_key_signatures( &'a self, ) -> impl Iterator<Item = &'a Signature> + Send + Sync

Returns set of active certification approval key signatures.

This feature is experimental.

Returns the set of signatures with the newest valid signature creation time. Older signatures are not returned. The sum of all digests in these signatures are the set of approved third-party certifications.

This interface is useful for pruning old certification approval key signatures when filtering a certificate.

Note: This is a low-level interface. Consider using ValidUserAttributeAmalgamation::approved_certifications to iterate over all approved certifications.

Source

pub fn approve_of_certifications<C, S>( &self, primary_signer: &mut dyn Signer, certifications: C, ) -> Result<Vec<Signature>>
where C: IntoIterator<Item = S>, S: Borrow<Signature>,

Approves of third-party certifications.

This feature is experimental.

Allows the certificate owner to approve of third party certifications. See Approved Certifications subpacket for details. This can be used to address certificate flooding concerns.

§Examples

See ValidUserIDAmalgamation::approve_of_certifications#examples.